Forum Discussion
Excluding Future Years from DAX Code
Hey Nathan,
I believe if you just returned Result in measure 7.1.3.1, 2024 would not show up in the first visual.
Also, I believe 7.1.3.2 is breaking because no matter where you are on the x-axis, you're now overriding the filter on policy year with a filter that looks at all policy years 2023 and back. More concretely, no matter what year you look at on the x-axis, what the calculate in 7.1.3.2 is doing is returning all data from 2011 to 2023 instead of just that one year. Therefore, CY is always 2023 and PY is always 2022. That's why the second visual always returns 14, which is the calculation for 2023 in the first visual.
----------------------------------
If this post helps, please consider accepting it as the solution to help other members find it quickly. Also, don't forget to hit that thumbs up and subscribe! (Oh, uh, wrong platform?)