Forum Discussion
Lukas90
1 year agoNew Member
DAX
Hi, I need to write a measure that will be calculated on the chart only for the smaller of the selected years. That is, if I select 2023 and 2024 on the slicer, I only want to see the value for 2...
- 1 year ago
yes you are right. The issue was due to an oversight on my part. you should write it as follows...
var min_year = calculate( min ('date' [year]) , allselected ('date' [year]))
Selva-Salimi
1 year agoSolution Sage
Hi Lukas90
you can update your measure as follows:
measure _min :=
var min_year = min ('date' [year]) (if you dont have dim date you should use all or allselected)
return
if (selectedvalue(year) = min_year , blue_measure , 0 )
If this post helps, then I would appreciate a thumbs up and mark it as the solution to help the other members find it more quickly.