Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
I have these rules on this multi-line card. I want the Active lines to have a Green bar and i want the Expired lines to have red.
As you can see they are all red despite the values. The zero/one on the right-most column is the value the rule is assessing.
Shouldn't this work? Thanks for any pointers.
Solved! Go to Solution.
@Anonymous I just ran into this problem recently on the conditional formatting for Axis colours - it doesn't work within the visual, but rather looks at the value of the measure OUTSIDE the context of the visual, so it's looking at the SUM of the measure across the entire data model, which is not zero.
Unfortunately NO, the bar colour conditional formatting doesn't work as you want/expect.
Try adding a filter to your page and filter for one of the lines where the Expired measure = 0, and you'll see all the bars turn green.
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
@Anonymous I just ran into this problem recently on the conditional formatting for Axis colours - it doesn't work within the visual, but rather looks at the value of the measure OUTSIDE the context of the visual, so it's looking at the SUM of the measure across the entire data model, which is not zero.
Unfortunately NO, the bar colour conditional formatting doesn't work as you want/expect.
Try adding a filter to your page and filter for one of the lines where the Expired measure = 0, and you'll see all the bars turn green.
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
Thank you @AllisonKennedy How odd to allow a function to control the color, but then set the context for the formatting outside the vis.
@Anonymous You're welcome, and yes I thought so too. I'm sure we're not the only ones who have been tricked by this!
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
Check out the September 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
107 | |
99 | |
99 | |
38 | |
37 |
User | Count |
---|---|
157 | |
121 | |
73 | |
73 | |
63 |