Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
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" )
Solved! Go to Solution.
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
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
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the September 2025 Power BI update to learn about new features.