Forum Discussion
DAX Dynamic Filter
Hi Allison,
Here is the thing, maybe I do not need Display Year=1. I just want the filter so that I can cap the year at a certain point. My years only goes up to 2021 in my model. It would be nice to do it dynamcally (use MAX year from my model). Display Year is an IF expression I wrote, its a calculated column, it displays 1 or 0 depending if I have a data for that year. It would be great if I could add a Filter, MAX year from the table I have that contains data, which goes up to 2021 for now, more years will be added later.
pfarahani Is _JBSIS Probate Dates Year Month a DimDate table containing dates beyond those that actually have data?
You could simply add a filter to the page or even filters on all pages sections or to a specific visual (depending on what you want), that says Display Year = 1
And that will ensure only valid dates are selectable.
- pfarahani4 years agoHelper II
Hi Allison,
I got a little closer, I created a variable which I tested. I just need to know where to apply the variable. To say, WHERE [Year] <= _MaxYear