Forum Discussion
Alternate Bar Colors for each group
Hello,
I'm trying to create a bar chart that has alternating colors for each main group, where when drilled down the hierarchy, the alternating colors apply to the main group as well. Example below:
The alternating colors have to be dynamic. For example, if I filter by Group A and Group C, the colors will alternate instead of having both in green. I'm also hoping that it is scaleable such that it works when new groups are added.
Thanks in advance!
8 Replies
- lbendlin
Super User
That's a column chart.
Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
Do not include sensitive information. Do not include anything that is unrelated to the issue or question.
Please show the expected outcome based on the sample data you provided.
Need help uploading data? https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216
Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523- darentengmfs
Post Prodigy
Hello lbendlin
Here is the sample data
Group Date of Transaction Sales A 1/1/2022 150 A 1/1/2023 123 A 1/1/2024 122 B 1/1/2022 174 B 1/1/2023 198 B 1/1/2024 130 C 1/1/2022 176 C 1/1/2023 199 C 1/1/2024 124 D 1/1/2022 185 D 1/1/2023 188 D 1/1/2024 172 E 1/1/2022 144 E 1/1/2023 125 E 1/1/2024 133 Below is the outcome I would like to achieve:
And below is an example of what I want to avoid (colors does not alternate dynamically):
- darentengmfs
Post Prodigy
Thanks, that works. Although I have to create one measure for each of the fields available, which is not a big deal!