Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Anonymous
Not applicable

Do Multi-row Card viz Bar Color rules work?

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.

SeaIT_0-1633053922174.png

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.

1 ACCEPTED SOLUTION
AllisonKennedy
Super User
Super User

@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. 


Please @mention me in your reply if you want a response.

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

View solution in original post

3 REPLIES 3
AllisonKennedy
Super User
Super User

@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. 


Please @mention me in your reply if you want a response.

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
Not applicable

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!


Please @mention me in your reply if you want a response.

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

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.