Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!
I am working on a stacked column chart, where I want to customize the colors based on both the legend information and the x-axis information. Here is as far as I've come:
As you can see I have the x-axis split in 2022/2023 by Month, and in the legend I have "Nature of spending":
What I would like to do, is have the colors be different for 2022 and 2023. It's not very obvious in the current layout, that it's two different columns per month. But I can only speficify the color based on the legend.
Any ideas on how to do this? - Without having to pay for a custom visual developed by third party?
Solved! Go to Solution.
Hi, may be you can make 4 measures. Provided you always show the current and the previous year.
Calls (2023)= Calculate(Count(Calls)), 'Date Table'[Year]=Year(Today()))
Calls (2022)= Calculate(Count(Calls)), 'Date Table'[Year]=Year(Today())-1)
and the same for emails, then you will get something like this:
Hi, may be you can make 4 measures. Provided you always show the current and the previous year.
Calls (2023)= Calculate(Count(Calls)), 'Date Table'[Year]=Year(Today()))
Calls (2022)= Calculate(Count(Calls)), 'Date Table'[Year]=Year(Today())-1)
and the same for emails, then you will get something like this:
Do you put the measures in the Y-Axis? this is the error message I get for each of them
Nevermind - I got it to work! thanks so much!!!!
Vote for your favorite vizzies from the Power BI World Championship submissions!
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 59 | |
| 53 | |
| 42 | |
| 20 | |
| 16 |
| User | Count |
|---|---|
| 123 | |
| 106 | |
| 44 | |
| 32 | |
| 24 |