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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Card - Conditional Formatting

Hi, 

 

I am trying to get the conditional formatting to work on my cards.  I am looking at Inventory data and have Age Buckets that have goals associated with it:

kgdulban_0-1668708381962.png

 

I am currently working on the 151 to 180 bucket.  The current percent of the Inventory that is in the bucket is 5.52%

kgdulban_1-1668708568420.png

When I try to use the Rule format style and use the logic below:

kgdulban_0-1668730709444.png

 

The resulte is in black: 

kgdulban_1-1668730766233.png

 

I have also tried to to use the number variation of 5 and 100, but it is the same.  I am not sure why the coloration is not switiching accordingly.  

 

I have also tried to use the Gradient formatting style and am having a similar issue:

kgdulban_2-1668730971699.png

Again, same issue.  The coloration is not correct. I have also, again, tried the whole numbers and having the same issue.  

 

Any help is welcome! Thank you in advance.

 

 

 

1 ACCEPTED SOLUTION
PhilipTreacy
Super User
Super User

Hi @Anonymous 

 

Please download this example PBIX file

 

Not sure how you are calculating your buckets, see my file for what I've done.

 

But, if you do something like this

151 to 180 = DIVIDE(CALCULATE(COUNTROWS('DataTable'), FILTER('DataTable', 'DataTable'[Aging Bucket] = "151 to 180")), COUNTROWS(ALL('DataTable')))

 

Then set up the card and go into the CF rules

cfb.png

 

It works for me

cfb2.png

 

Regards

 

Phil



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


View solution in original post

1 REPLY 1
PhilipTreacy
Super User
Super User

Hi @Anonymous 

 

Please download this example PBIX file

 

Not sure how you are calculating your buckets, see my file for what I've done.

 

But, if you do something like this

151 to 180 = DIVIDE(CALCULATE(COUNTROWS('DataTable'), FILTER('DataTable', 'DataTable'[Aging Bucket] = "151 to 180")), COUNTROWS(ALL('DataTable')))

 

Then set up the card and go into the CF rules

cfb.png

 

It works for me

cfb2.png

 

Regards

 

Phil



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.