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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
kcreno
New Member

conditional formatting bar chart not working

I cannot figure out what I'm doing wrong, I've watched several videos and I think I'm doing what they said. 

It's very simply, if were down negative % I want red, if we're up and postive % I want green.... 

 

IDK why it isn't working. 

 

Thanks! cond format rul snip.PNGgraph wrong color.PNG

1 ACCEPTED SOLUTION
danextian
Super User
Super User

Hi @kcreno ,

I forgot to hi reply earlier...

It seems that conditional formatting doesnt work on bars without categories. As a workaround, you can use a dummy column from a disconected dummy table and use that in the category axis

danextian_0-1713137117946.png

danextian_1-1713137406690.png

 

 










Did I answer your question? Mark my post as a solution!


Proud to be a Super User!









"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

View solution in original post

5 REPLIES 5
danextian
Super User
Super User

Hi @kcreno ,

I forgot to hi reply earlier...

It seems that conditional formatting doesnt work on bars without categories. As a workaround, you can use a dummy column from a disconected dummy table and use that in the category axis

danextian_0-1713137117946.png

danextian_1-1713137406690.png

 

 










Did I answer your question? Mark my post as a solution!


Proud to be a Super User!









"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

Hi @danextian ,

 

Thanks so much for the solution. Unfortunalty, I am so new to Power BI I'm not even sure what a dummy column or table are. I'll have to continue to do some research.

Try this calculated table

Dummy =
ROW ( " ", " " )

Put the column " " in the category tile. That will return an error inititally but should be fine after adding the measure.










Did I answer your question? Mark my post as a solution!


Proud to be a Super User!









"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.
DataNinja777
Super User
Super User

Hi @kcreno ,

Please refer to the solution provided by @danextian in the link below:

https://community.fabric.microsoft.com/t5/Desktop/How-to-color-negative-number-in-red-in-stacked-bar...

Best regards,

 

Hi @DataNinja777 , I tried that but it still didn't work? Is it because I'm working with percentages? I JUST started learning Powre BI and am not very familliar at all yet with DAX so I'm not sure what I'm doing wrong. negcolor.PNG

Helpful resources

Announcements
Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Jan NL Carousel

Fabric Community Update - January 2025

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