Forum Discussion
Slicer Selection
Dears, I need help for this issue, I have a table containing year, month, rank for each player, the rank represent in a card in the power bi
Issue: if the user selects specific year and no month selected I need to got the max month for the selected year and got the rank for the maximum month and set to the card view
hi Anonymous
You just use ISFILTERED Function to create a measure as below:
Measure = IF(ISFILTERED('Table'[month]), CALCULATE(SUM('Table'[rank])), CALCULATE(SUM('Table'[rank]),FILTER('Table','Table'[month]=MAX('Table'[month]))) )and here is sample pbix file, please try it.
Regards,
Lin
3 Replies
- amitchandakSuper User
Anonymous , If month year is selected, than maxx(Value(Table[Month]),[Rank]) should give you max
- AnonymousNot applicable
amitchandak what i need here that the year only selected , after that the slicer of the month will fill with the months available for selected year , if the user did not select a specific month then i git the max month in the slicer and get the rank for this month (max month)
- v-lili6-msftCommunity Support
hi Anonymous
You just use ISFILTERED Function to create a measure as below:
Measure = IF(ISFILTERED('Table'[month]), CALCULATE(SUM('Table'[rank])), CALCULATE(SUM('Table'[rank]),FILTER('Table','Table'[month]=MAX('Table'[month]))) )and here is sample pbix file, please try it.
Regards,
Lin