Forum Discussion
lastnn30
4 years agoPost Patron
Top N using Card visual
Hi I have 2 fields, Name and Total. I want to create 2 cards, one to show the name of the person who scored the highest and the second card to show the highest number. for the highest number, it wor...
- 4 years ago
Hi lastnn30 - you cannot filter cards the same way you can tables and other visuals since they only return one value.
Try this measure:Top Name = VAR varTopValue = MAX('Latest File'[Total]) VAR Result = MAXX( FILTER( 'Latest File', 'Latest File'[Total] = varTopValue ), 'Latest File'[Name] ) RETURN ResultIt gets the top value in that table, then gets the name of that person. MAXX() here is just converting the name to a scalar value, not returning the hightest name. the FILTER() function is returning a single record with Mark's data.
- 4 years ago