Good morning, I have a table with multiple records, from which I want to retrieve the last N records, these in turn must belong to the same point.
IdReg__|Cod.Punto|pH__|Od|NTU โฆ
2210|PTO001__|7.45|5.41|12.1
2211|PTO002_|8.15|7.97|7.88
2212|PTO003_|7.54|6.11|9.12
2213|PTO001_|6.78|4.18|7.45
2214|PTO002_|8.24|7.91|4.66
2215|PTO003_|9.11|7.48|9.44
2216|PTO001_|4.47|4.91|8.12
2217|PTO002_|6.54|6.88|10.4
2218|PTO003_|6.45|5.41|12.4
2219|PTO001_|4.47|4.91|8.12
2220|PTO002_|6.54|6.88|10.4
2221|PTO003_|6.45|_5.41|___12.4
What would be the method to obtain the last 10 records of the table that correspond to โPTO001โ?
Solved! Go to Solution.
Wait, you are on a row filter condition.
The expression was for giving a list of items, depending on a specific row.
From what I see, this would rather be:
IN([_THISROW],
TOP(
ORDERBY(
FILTER("Registro CAR",
[Cod. Estaciรณn]="CA-07"
),
[_ROWNUMBER],true)
,10
)
)
Hi @Aylas
Welcome to the community !
It will be a mix with TOP and ORDERBY.
Depending on your table structure, you may want to use a SELECT or FILTER as well.
For reference:
Thanks for the answer, could you give me a suggestion on how to use the mentioned expressions?
Yes.
Does that gives you a clue ?
or
Otherwise, please share your table structure (with screenshot)
I want to do the filtering through โCod. Estaciรณnโ, the primary key is โNยฐ Muestraโ
Thanks for the screenshot.
What about that ?
TOP(
ORDERBY(
FILTER("Registro CAR",
[Cod. Estaciรณn]="CA-07"
),
[_ROWNUMBER],true)
,10
)
Edit: some comma removed
Thank you very much, for your consideration, I attach some screenshots, I did not manage to make the sentence run.
Wait, you are on a row filter condition.
The expression was for giving a list of items, depending on a specific row.
From what I see, this would rather be:
IN([_THISROW],
TOP(
ORDERBY(
FILTER("Registro CAR",
[Cod. Estaciรณn]="CA-07"
),
[_ROWNUMBER],true)
,10
)
)
Perfect, thank you very much, it worked like a charm.
There is an example of this in the TOP()
help document.
User | Count |
---|---|
15 | |
14 | |
8 | |
7 | |
4 |