Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi guys,
I need to show the max value per row by date, how can I do this?
In this case, I need to return the number 8 and the number 3
my measure:
aggr(distinct Only({<Date={"$(=Date(max(Date),'DD/MM/YYYY hh:mm:ss'))"}>}[Value]),Code,Date)
Expressions are evaluated only once per chart and not once per row,
basically you cannot have a different formula for each row in your table, Since each of your code may have a different max date, this is not possible
You will have to create a new field in your datamodel table to flag the max date for each code, and then refer to the flag field in set expression
First of all, thank you for your answer
However, I have different dates for each code in my data model. I don't understand why I need a flag, and how can I use this in my expression.
for row 1 the max date becomes 18/04/2022 10:18:17
for row 2 the max date becomes 18/04/2022 10:17:52
when you use Max() in chart it can only return one Max value to filter on, since the evaluation in set analysis happens for the entire chart not each row
since all your codes have different max dates it cannot evaluate a different filter for each dimension value in the chart
I'm testing the firstsortedvalue, I think its working
FirstSortedValue([Value],-aggr(max( Date), Value))