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.
Region | Country | Value | Condition |
Asia | China | 1000 | 3 |
Asia | Japan | 500 | 2 |
Asia | Korea | 250 | 1 |
America | USA | 1000 | 3 |
America | Canada | 500 | 2 |
So I have the above table... Would like to create a 100% stacked bar chart off of the conditions (3 = Green, 2 = Yellow, 1 = Red)
I've tried
Measure = IF(metrics[Condition] = 3, "GREEN", IF(metrics[Condition] = 2, "YELLOW", "RED"))
But it does show up as values in my table, but I could not seem to input it into the bar chart.
Hi @WestWinter ,
Is there any field placed in the Legend pane?
If so, I think you have to change the color manually in the Data colors.
If not, you can format the data color using the measure.
If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @WestWinter
Try to add a column to your table with this measure:
Measure =
SWITCH ( metrics[Condition], 3, "GREEN", 2, "YELLOW", 1, "RED" )
Table will be like this:
Then use it in the chart:
Did I answer your question? Mark my post as a solution!
Appreciate your Kudos !!
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 |
---|---|
113 | |
97 | |
84 | |
67 | |
60 |
User | Count |
---|---|
150 | |
120 | |
99 | |
87 | |
68 |