Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi
I have a slicer where I'd like to use the max value to filter another table:
Year of Account = FILTER((AccountYear), VALUE(AccountYear[yoa_code]) <= CALCULATE(MAX(Period[period_year])))
However the table is not being filtered - I'm expecting 2024 to appear as 2020:
Hard-coding the value gives me the desired result:
Can someone advise wher I'm going wrong please?
Thanks
Brian
Hi @Pragati11
I have data up to 2019 but want to show all columns upto the Period Year in my table - even if there is no data. If I hard-code the value 2020 into the Year of Account, I get the desired result:
Also @Pragati11, Year of Account is a calculated table:
Hi @Pragati11
I've created the following measure:
Max Period Year = CALCULATE(MAX(Period[period_year]), ALL(Period))
and used it here:
Year of Account = FILTER((AccountYear), VALUE(AccountYear[yoa_code]) <= Period[Max Period Year])
However, I'm still seeing 2024 rather than 2020:
Hi @brian0782 ,
What all date range data you have in your data?
Is that you have data till 2024 but want to show only till 2020 in the slicer?
Also in your slicer you have got a different field moved. See below:
You should move the new calculation in your slicer "Year of Account".
Hi @brian0782 ,
Create a measure for your maximum period year as follows:
Max Period Year = CALCULATE(MAX(Period[period_year]), ALL(Period))
Now use this measure in place of "CALCULATE(MAX(Period[period_year]))" in your DAX expression for Year of Account.
Let me know if this works.
Thanks,
Pragati
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
46 | |
21 | |
20 | |
15 | |
13 |
User | Count |
---|---|
45 | |
41 | |
39 | |
19 | |
19 |