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
Hi there,
Is it possible to display the following in a (matrix) table:
Column heading: month
Cell names: department no
Values: sales this year, line break, sales last year
I only manage that it makes an extra column for the values.
Example:
| Department No | January | February | March |
| 1 | 50€ (sales this year) 30€ (sales last year) | 10€ 20€ | 0€ 0€ |
| 2 | 100€ 200€ | 150€ 120€ | 0€ 0€ |
king forward to your ideas on how I can solve this 🙂
Kind regards
Solved! Go to Solution.
Hi @Meeresblume
This is actually quite easy, but it requires that your data model have a date table and that it is marked appropriately.
Create two measures like this:
Sales CY = SUM(Table[Sales])
Sales PY =
CALCULATE(
[Sales CY],
SAMEPERIODLASTYEAR(DateTable[Dates])
)
Create your matrix, department down the side and year and month (taken from the date table!) across the top. Drop those two measures in as values. And then on the formatting pane under values, find the option I highlighted
Hope this helps!
Hi @Meeresblume ,
Whether the advice given by @littlemojopuppy has solved your confusion, if the problem has been solved you can mark the reply for the standard answer to help the other members find it more quickly. If not, please point it out.
Looking forward to your feedback.
Best Regards,
Henry
Hi @Meeresblume
This is actually quite easy, but it requires that your data model have a date table and that it is marked appropriately.
Create two measures like this:
Sales CY = SUM(Table[Sales])
Sales PY =
CALCULATE(
[Sales CY],
SAMEPERIODLASTYEAR(DateTable[Dates])
)
Create your matrix, department down the side and year and month (taken from the date table!) across the top. Drop those two measures in as values. And then on the formatting pane under values, find the option I highlighted
Hope this helps!
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!