The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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.
User | Count |
---|---|
24 | |
10 | |
8 | |
7 | |
6 |
User | Count |
---|---|
32 | |
12 | |
10 | |
10 | |
9 |