Forum Discussion
Conditional formating using what if parameter
Hello Community Members
I have a question related to what dynamic conditional formating using What if parameter
When I am trying to conditionally format a bar graph data color using a measure with hard coded values the conditional formating works fine but when I try to replace the hard coded numbers with selected values in what if parameter slicer my conditional formating is not working as expected and behaving wierldly. Can anyone help in this regard
Test_color =
IF (
[% Approved BIAs] >= 0.9,
"#45ac34",
IF (
[% Approved BIAs] >= 0.8,
"#ee7203",
IF ( [% Approved BIAs] <= 0.7, "#e51f22" )
)
)
This measure works fine
but the moment is replace the 0.9, 0.8 and 0.7 with the values below
AllisonKennedy , Can you please share the pbix file with me to check my side
JituPBI Sample file attached below signature.
5 Replies
- AllisonKennedyCommunity Champion
JituPBI
Make sure the DAX for your [% Approved Bia's - Amber Config Table Value] is correct. If you're using the default - ensure you have a default value supplied. Also check that your value is a number and not percent - you may need to multiply or divide by 100 to get it to behave as expected.Finally (or maybe initially) - are you trying to conditionally format the same slicer as the what if parameter? This doesn't work unfortunately since the context of the slicer itself still has all the values for that parameter. You need to apply the conditional formatting on a different visual than the slicer.
- JituPBIFrequent Visitor
Hello AllisonKennedy, I am using the correct DAX for [% Approved Bia's - Amber Config Table Value] and it is also configured correctly as decimal number where as the value that I want to change as per the result on the slicer is on a bar graph and not trying to format the slicer. Maybe If possible I can connect with you and explain my scenario, If that helps
- AllisonKennedyCommunity Champion