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

A new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.

Reply
TK12345
Resolver II
Resolver II

Use 1 dimension column for 2 measures in Matrix

Hi all,

I need a little help with the following. I have a fact table with production and sales. 1 Key date that is linked with the calendar table. 1 column with the max sales date. This max Sales date needs to be compared with all the mutations before that date. 

So the last date column will be used as column in the matrix. So I will have 3 colums, 05-06-2023, 03-07-2023 and 31-07-2023. What I would like to see is a measure with 2 variables. 1 Production and 1 Sales. For column 05-06-2023, I would like to the SUM of amounts where the Date Column <= 05-06-2023 and type = production, for the second column 03-07-2023 I would like to the SUM of amounts where the Date Column <= 03-07-2023 and type = production and so on. See expected outcome. The second variable needs to be the sales. 

Who could help me out?

Expected Outcome:

 5-6-20233-7-202331-7-2023
Production500600800
Sales400550850


Data: 

TypeDateAmountLastDate_KeyProduct
Production20-5-20234005-6-20231a
Production30-5-20231003-7-20231a
Production8-6-20231003-7-20231a
Production5-7-202310031-7-20231a
Production15-7-202310031-7-20231a
Sales20-5-2023-250 1a
Sales5-6-2023-150 1a
Sales8-6-2023-150 1a
Sales5-7-2023-150 1a
Sales15-7-2023-150 1a
1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

1 REPLY 1
lbendlin
Super User
Super User

lbendlin_0-1686705840150.png

 

see attached

Helpful resources

Announcements
May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.