ANY(SELECT(Vistorias[CONCATS],[_THISROW].[TP Nº]=[TP Nº]))
I'm trying to make the result of this expression always display the most recent item in the table. However, it always displays the first item.
I tried using ORDERBY like this:
ANY(ORDERBY(SELECT(Vistorias[CONCATS],[_THISROW].[TP Nº]=[TP Nº]),[Data de Vist]))
however, I get as a return:
Solved! Go to Solution.
ORDERBY requires a list of row keys and then sorts the rows DESCENDING accordingly. You would then need to SELECT the column value that matches the TOP sorted row.
Not to bad to create but instead I would use MAXROW like this:
ANY(SELECT(Vistorias[CONCATS],
[row key] = MAXROW("Vistorias", "Data de Vist", [_THISROW].[TP Nº]=[TP Nº])
))
NOTE: you will need to replace "row key" with the column of the table key column.
ORDERBY requires a list of row keys and then sorts the rows DESCENDING accordingly. You would then need to SELECT the column value that matches the TOP sorted row.
Not to bad to create but instead I would use MAXROW like this:
ANY(SELECT(Vistorias[CONCATS],
[row key] = MAXROW("Vistorias", "Data de Vist", [_THISROW].[TP Nº]=[TP Nº])
))
NOTE: you will need to replace "row key" with the column of the table key column.
Oh, ty very much!
User | Count |
---|---|
36 | |
31 | |
30 | |
20 | |
17 |