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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hello,
Dataset: Salespeople and the different transactions associated to them
Visual: Horizontal bar chart with a hierarchy. Displays a couple different KPIs based on a Chiclet slicer. IE: Sales, Margin.
Request: Colour the bar chart with "better than last year" or "worse than last year" (to start)'.
So far I have two calculations, one that is for current year and one for last year like this:
Solved! Go to Solution.
What I would try is this.
What I would try is this.
I'm trying to get an aggregate of the totals (based on our filters).
For example:
Tom and Alice are salespeople with 100 and 155 transactions respectively. Tom had 25 in March 2019 totalling $100, Alice had 15 in March 2019 totalling $150. In March 2018 Tom had done $110, and Alice had done $140.
I'd like the bar chart to show - when I filter on March, 100 and 150, with the 100 coloured red, and the 150 coloured green (for example to show good and bad).
There isn't really a specific value per row to show better than last year, as they're all just transactions and it depends on the aggregate.
We also do filters on things like location, etc that would have to be respected in this colouring
I don't see any changes in my suggestion based on you comments. Write 2 sets of measures as I described and add them as stacked bar charts. If you can't write measures that indentify good and bad, how can you colour them anyway?
Hey,
Ah yes this works! I didn't understand your solution before and responded a little too quickly. I was hoping to get it to colour based on the aggregation being better/worse, but creating two aggregations (one better, one worse) does accomplish the same goal.
I'll mark your solution as correct
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 40 | |
| 38 | |
| 36 | |
| 29 | |
| 28 |
| User | Count |
|---|---|
| 127 | |
| 88 | |
| 78 | |
| 66 | |
| 65 |