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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
ymilne
Frequent Visitor

Conditional Formatting - Bar Chart with Drilldown

I'm trying to apply conditional formatting to a bar chart which has drilldown.

 

The first level is Products, and the scond level is month for full year.  I want the bar chart to be coloured green when viewed at a product level, and for monthly the actuals blue, and the forecast green.

 

The DAX i'm using is as follows.

 

Month Colour (FYF) = 

SWITCH ( TRUE(),

SELECTEDVALUE ( Dim_Table_Date[EndOfMonth]) < [CM Date +1] , "#155199", --Blue Colour--

SELECTEDVALUE ( Dim_Table_Date[EndOfMonth]) > [CM Date] , "#44B388", --Green Colour--

"#44B388" )
 
This works for the monthly data, however, when at Product level it is defaulting to blue and not the green I want.
 
Is it possible to get the green colour without changing my theme settings?
1 ACCEPTED SOLUTION
Kedar_Pande
Super User
Super User

Updated DAX Measure:

Month Colour (FYF) = 
SWITCH(
TRUE(),
ISINSCOPE(Dim_Table_Product[Product]),
"#44B388", -- Green Colour for Product Level
SELECTEDVALUE(Dim_Table_Date[EndOfMonth]) < [CM Date + 1],
"#155199", -- Blue Colour for Monthly Data
SELECTEDVALUE(Dim_Table_Date[EndOfMonth]) > [CM Date],
"#44B388", -- Green Colour for Monthly Actuals
"#44B388" -- Default to Green Colour
)

If this helped, a Kudos 👍 or Solution mark would be great!🎉
Cheers,
Kedar Pande
Connect on LinkedIn

View solution in original post

2 REPLIES 2
Kedar_Pande
Super User
Super User

Updated DAX Measure:

Month Colour (FYF) = 
SWITCH(
TRUE(),
ISINSCOPE(Dim_Table_Product[Product]),
"#44B388", -- Green Colour for Product Level
SELECTEDVALUE(Dim_Table_Date[EndOfMonth]) < [CM Date + 1],
"#155199", -- Blue Colour for Monthly Data
SELECTEDVALUE(Dim_Table_Date[EndOfMonth]) > [CM Date],
"#44B388", -- Green Colour for Monthly Actuals
"#44B388" -- Default to Green Colour
)

If this helped, a Kudos 👍 or Solution mark would be great!🎉
Cheers,
Kedar Pande
Connect on LinkedIn

Thank you, this worked perfectly

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors