Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hi,
I'm trying to compare two columns using clustered column chart, and want to make a filter that if I select "yes" then the visual will be filtered into a visual that shows column a more than column b.
Is it possible to use greater than as a result in the if statement?
For example,
Activity has planned duration and actual duration.
And If I select yes in slicer then the visual will display the actual duration value that exceeds the planned duration, and if I select no it will display the actual duration value which is less than equal to the planned duration.
Appreciate your help.
Thank you.
Solved! Go to Solution.
The big question here is if you can do it as a column or if you need a measure.
If you can do it as a column then it would be like
Greater = If (Actual_Duration>Planned_Duration,"Yes","No")
and you would then use that column to feed your slicer.
For a measure version you would need to feed the slicer from a disconnected table.
Hi @Anonymous
To make it more clear, you need create a Calculated column and then use the new column to create Slicer. Calculated column used to compare ACTUAL_DURATION with PLANNED_DURATION:
GreaterOrNot = If ('DURATION'[ACTUAL_DURATION]>'DURATION'[PLANNED_DURATION],"Yes","No")
Test result:
Attached the pbix file as reference.
Best Regards,
Community Support Team _ Caiyun
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. If you still have problems on it, please feel free to let us know. Thanks a lot!
The big question here is if you can do it as a column or if you need a measure.
If you can do it as a column then it would be like
Greater = If (Actual_Duration>Planned_Duration,"Yes","No")
and you would then use that column to feed your slicer.
For a measure version you would need to feed the slicer from a disconnected table.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
16 | |
13 | |
12 | |
11 | |
11 |
User | Count |
---|---|
19 | |
14 | |
14 | |
11 | |
9 |