Forum Discussion
ezequiel
Microsoft Employee
8 years agoShow the first bigger value
Hi, I have a table with all the days of the week and some values associated to them - Sales. Basically 2 columns. I just need to show the name of the day with the higher value on the sales column...
- 8 years ago
Hi ezequiel
If you have one value against each day, these MEASURES should give you desired result in a CARD
Measure = CALCULATE ( VALUES ( TableName[Day] ), FILTER ( ALL ( TableName ), TableName[sales] = MAX ( TableName[sales] ) ) )Alternate Measure = LOOKUPVALUE ( TableName[Day], TableName[sales], MAX ( TableName[sales] ) )
v-chuncz-msft
Community Support
8 years ago
You may use TOPN Function as well.
Measure = MAXX ( TOPN ( 1, Table1, Table1[Sales], DESC ), Table1[Day] )
ezequiel
Microsoft Employee
8 years agoHi Thanks for the help. I customized the measure script to my tables to
Measure = MAXX( TopN (1, Last_30_days_activity, Last_30_days_activity[# of Requests], desc), Last_30_days_activity[weekDay] )
but I'm getting a sintax error....any clue on what is wrong?
Thanks again
- v-chuncz-msft8 years ago
Community Support
- ezequiel8 years ago
Microsoft Employee
Hi! didn't work...see attached error. Thanks!
- v-chuncz-msft8 years ago
Community Support