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.
I'm trying to change the data bar colors in my Matrix, based on what column they fall in. Less than 15 = Green, Between 15 & 25 = yellow, and More than 25 = red. This is independent of invoice count or invouce amounts. In the below screenshot, you will notice I have been able to do what I want with icons, but I want to change the color of the databars, instead. Icons allow us to base the rules on another field, where data bars only let us change to colors based on the individual record. Is there a work around, or is this just how data bars work? I find it odd this functionality would exist for icons, but not data bars.
I want to apply icon rules to data bars and remove icons altogether
icons rules, works
data bars rule, doesn't work
Hi @16kernse ,
I created some data:
Here are the steps you can follow:
1. Create measure.
color1 =
SWITCH(
TRUE(),
[invoice_count] >=1&&[invoice_count]<=3,"green",
[invoice_count] >3&&[invoice_count]<=6,"yellow",
[invoice_count] >6&&[invoice_count]<=10,"red")
color2 =
SWITCH(
TRUE(),
[invoice_amount] >=1&&[invoice_amount]<=3,"green",
[invoice_amount]>3&&[invoice_amount]<=6,"yellow",
[invoice_amount]>6&&[invoice_amount]<=10,"red")
2. In Format - Conditional - set [invoice_amount] and [invoice_count] respectively.
3. Go to Background color – invoice_amount.
Format style – Field value
What field should we base this on – [color1]
4. Go to Background color –invoice_count.
Format style – Field value
What field should we base this on – [color2]
5. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi Liu. Thanks fo your response, but I'm trying to do this in data-bars and not the background color. Also, I am wanting the whole columns to be one color. Less than 15 = green, between 15 & 25 = yellow, more than 25 = red, regardless of invoice amount and invoice count. I'm trying to use the icon logic in the colors of the data bars, but i'm not convinced this is possible.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
111 | |
97 | |
80 | |
69 | |
59 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |