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 would like to return the minimum value based on the selection criteria used. Using the min function does not return the expected result. Please see below examples. Maybe I am overseeing something. Great if anyone can help.
In below measure I calculate the minyear (minimum year selected on page filter is 2021) and use it in the filter. This does not return the desired outcome as it also returns values in 2022.
In below example I do the same, however, the filter is not based on a minimum but on a year defined, in this case 2021. This is the desired outcome as it is not showing 2022 values.
Below the filter used on the page.
Solved! Go to Solution.
Hi @Khalidc ,
According to your description you want to show the date of the minimum year, I looked at your measure and can see that when there is a problem with your minyear definition, you use the MIN function to get not the minimum date, it will be calculated in the filter context, you can try the following DAX to define your minyear:
Var minyear = MINX(ALLSELECTED('Visma_financialPeriod'),[year])
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Khalidc ,
According to your description you want to show the date of the minimum year, I looked at your measure and can see that when there is a problem with your minyear definition, you use the MIN function to get not the minimum date, it will be calculated in the filter context, you can try the following DAX to define your minyear:
Var minyear = MINX(ALLSELECTED('Visma_financialPeriod'),[year])
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Many thanks Neeko! It did the job.
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 |
---|---|
51 | |
27 | |
24 | |
14 | |
9 |
User | Count |
---|---|
75 | |
58 | |
47 | |
16 | |
12 |