Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I have the table as follows:
date | fruit | sales |
07-12-18 | papaya | 99 |
07-12-18 | apple | 926 |
07-12-18 | orange | 852 |
08-12-18 | papaya | 961 |
08-12-18 | apple | 252 |
08-12-18 | orange | 207 |
09-12-18 | papaya | 642 |
09-12-18 | apple | 452 |
10-12-18 | orange | 280 |
11-12-18 | papaya | 129 |
12-12-18 | apple | 751 |
12-12-18 | papaya | 301 |
12-12-18 | orange | 19 |
I would want the fruit name with the most sales for the latest date. In this case, 'apple' should be my answer.
Thanks!
Create a KPI with this measure:
FirstSortedValue(fruit, -aggr( max ({<date={"$(=max(total date))"}>} sales),date))
Result:
Create a KPI with this measure:
FirstSortedValue(fruit, -aggr( max ({<date={"$(=max(total date))"}>} sales),date))
Result: