Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now
Hey guys, i have a small questions regarding a DAX measure.
My goal is to have my last measure "Above or below" in the visual to show "Equal or below" on the first selected week, and above on the rest. like i have screenshotted under. But when i select a week higher then 1, its not working.
This is my measure right now:
IF_TEST = IF(MIN('Dimension Date'[Week Number])>CALCULATE(MIN('Dimension Date'[Week Number]), REMOVEFILTERS('Dimension Date'[Week Number])),"Above","Equal or below")
It do seem that my REMOVEFILTERS removes the slicers i have selected and gives the lowest output. But i want my slicers to work.
Any suggestions?
Solved! Go to Solution.
It seems like you’re trying to retain the slicer selection while evaluating the minimum week number. Consider using the ALLSELECTED function instead of REMOVEFILTERS to respect the slicer’s context. Modify your DAX measure as follows: IF_TEST = IF(MIN('Dimension Date'[Week Number]) > CALCULATE(MIN('Dimension Date'[Week Number]), ALLSELECTED('Dimension Date'[Week Number])), "Above", "Equal or below"). This should give you the desired output based on your slicer selection. Remember, ALLSELECTED respects the filters applied by slicers, unlike REMOVEFILTERS which ignores all filters.
Best regards,
Johannes
It seems like you’re trying to retain the slicer selection while evaluating the minimum week number. Consider using the ALLSELECTED function instead of REMOVEFILTERS to respect the slicer’s context. Modify your DAX measure as follows: IF_TEST = IF(MIN('Dimension Date'[Week Number]) > CALCULATE(MIN('Dimension Date'[Week Number]), ALLSELECTED('Dimension Date'[Week Number])), "Above", "Equal or below"). This should give you the desired output based on your slicer selection. Remember, ALLSELECTED respects the filters applied by slicers, unlike REMOVEFILTERS which ignores all filters.
Best regards,
Johannes
Hey Johannes,
This did work perfectly! Thank you so much for the help!
Check out the October 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
112 | |
105 | |
102 | |
87 | |
61 |
User | Count |
---|---|
162 | |
132 | |
131 | |
95 | |
86 |