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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply

Color condition in the stacked bar graph

hi community,

 

I need to create a graph of stacked bars, with the following color rule: Gray color for days larger than the current date. And for the other days, set a color for each category in the chart. as shown in the image below:

Image 151.jpg

 

it's possible?

 

I got to separate the calculation, but the graph does not support more than one value on the axis.
 
I created the measure that checks the product category, and the current date, but when you add it to the color rule it doesn't work, it changes the color of the entire bar instead of the fraction that corresponds to the category.
 
measure =
IF([category] = "Basic","#51B679",
IF([category] = "Off","#D74552",
IF([category] = "Prem","#F6F6F6",
))))

measureDate = IF ([Date]>= NOW(),"#000",[measure])
 
can you help me?
2 REPLIES 2
amitchandak
Super User
Super User

@Wilianfilho_ps , conditional formatting is not possible visual with the legend.

If there is no legend, can one put in conditional formatting to show weekends? 
@amitchandak 

nick_SMTC_0-1619211473967.png

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors