Forum Discussion
Min value based on year column
Hi,
I've 2 columns, one with year and one with an integer value.
| Year | rank |
| 2017 | 35 |
| 2018 | 36 |
I'm simply trying to create a measure for this to calculate the minimum value to use in a card visual.
I have the following but get an error message:
parry2k I used this DAX which seems to work for me.
Measure = CALCULATE(MIN(Comparison[rank]),FILTER(ALLSELECTED(Comparison),(Comparison[Year] = (MIN( Comparison[Year] )))))
3 Replies
- parry2kSuper User
jimmyfromus what you refer to as minimum value? Can you provide a bit more details? Are you referring to minimum rank or what?? Read this post to get your answer quickly.
https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490- jimmyfromusHelper III
parry2k, Ok, so I've a table with 2 columns, year and rank(both are whole number columns). I've a slicer using the year and then a card visual using the min value of the rank. When no year is selected in the slicer, the year value is picked up as 2017 in the card visual and the rank (min value) is shown as 14 in the card visual. I would however like that the year value is 2017 but the rank value is shown as 15. What measure would I need to use to do this?
- jimmyfromusHelper III
parry2k I used this DAX which seems to work for me.
Measure = CALCULATE(MIN(Comparison[rank]),FILTER(ALLSELECTED(Comparison),(Comparison[Year] = (MIN( Comparison[Year] )))))