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.
Hello. I have created a boxplot (box and whisker) chart using Jan Pieter Posthumas visual. Here is a snapshot of what it looks like:
As you can see, I have 3 boxplots (W,U,L) with 3 consistent colors. The problem I have is that the colors do not remain consistent when items are filtered out. Based on some filters I have chosen, "U" no longer has data, so the boxplot does not show and then the colors for "W" and "L" change - see below:
How can I keep the colors consistent? Or is there a way to keep the 3 boxplots in the report regardless of the filters chosen?
Thanks!
You can set specific colours for each category under the 'Data colors' section of the Format pane.
Make sure the 'Show all' switch is on and then you'll see each category and a colour selector listed below.
Best regards,
Martyn
Hi @MartynRamsden I appreciate the suggestion, but the problem I am having is that when I filter down the data based on several different criteria, the population size decreases. This means that sometimes "W" has no records to build a boxplot and then my colors shift or don't stay the same. Here is a screenshot of the "Data Colors" area and as you can see "W" can not be found:
I've done some testing and now fully understand your issue. Unfortunately, I don't think there's a solution.
I was under the impression that when using the 'Data colours' formatting option, you were assigning colours directly to categories - it appears this isn't the case in this visual!
It looks like the colours are actually being assigned to the order the categories appear in. Hence, if a category is filtered out, the remaining visible categories will change colour, as you're seeing.
Most of the built in Power BI visuals now support Conditional Formatting but this isn't an option in the Box Plot visual you're using.
Sorry I can't be of any more help!
Best regards,
Martyn
Thanks @MartynRamsden - you are spot on. The colors are based upon sorting, unfortunately. At this moment I do not know a better way to color the boxplots. Oh well! I'll keep trying.
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 |
---|---|
112 | |
97 | |
85 | |
67 | |
59 |
User | Count |
---|---|
150 | |
120 | |
99 | |
87 | |
68 |