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.
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
Solved! Go to Solution.
@JituPBI Sample file attached below signature.
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
@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.
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
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
@JituPBI It works in my test:
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
@JituPBI Sample file attached below signature.
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
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 |
---|---|
110 | |
109 | |
88 | |
76 | |
66 |
User | Count |
---|---|
126 | |
112 | |
99 | |
82 | |
73 |