Forum Discussion
DAX
- 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]))
Hi Lukas90
I have a half solution that works, but will keep all the years on the x axis visible at all times:
SelectiveVis table has a Year column and two measures (Correct and Wrong, correct is the one you want to show on all years, wrong is the one you want to show only on the min year) based on 2 columns
I create a separate table (yrhlp) that only has one year column.
Then a third measure:
Then configure relationship as follows:
In your visual, use the year from SelectiveVis as the axis, but in your slicer use the year from yrhlp.
Here is how it looks:
Couldnt find a way to get rid of the blank 2022 column unfortunately. But in terms of showing the measure only on the min year, it does what you were after.
Hope it helps a little!