Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
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
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 |
---|---|
77 | |
76 | |
57 | |
36 | |
34 |
User | Count |
---|---|
99 | |
56 | |
56 | |
46 | |
40 |