Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Meeresblume
Helper I
Helper I

In (matrix) table, line break with second value in the columns

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 NoJanuaryFebruaryMarch
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

1 ACCEPTED SOLUTION
littlemojopuppy
Community Champion
Community Champion

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

littlemojopuppy_0-1644713930443.png

Hope this helps!

 

View solution in original post

2 REPLIES 2
v-henryk-mstf
Community Support
Community Support

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

littlemojopuppy
Community Champion
Community Champion

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

littlemojopuppy_0-1644713930443.png

Hope this helps!

 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors