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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

How to sum different columns from different periods

Hi, i am trying to develop a measure and i got stuck.

 

 

I have a table like theres

Month | Debt in N | Debt in N+1 | Debt in N+2

202301   151                  227                270

202302   138                 195                226

202303    311                395                453

 

I want to see the total debt in every month, I expect a matrix like there

 

Periodo | Total Debt

202301        151

202302        (138+227)

202303      (270+195+311)

 

Thank u so much!

2 REPLIES 2
CoreyP
Solution Sage
Solution Sage

You can either pivot your dataset so it looks like:
Period | Debt Type | Debt Value
202301 | N | 151
202301 | N+1 | 227
202301 | N+2 | 270
etc..

Or, create a calculated column that adds all the columns together into a total by month field.

Anonymous
Not applicable

Hi Corey, thank you for answering but thats not what i expect.

 

I want to get for January the value of the column "Debt in N" (151)

For Feb, i want to get the value of the column "Debt in N" for Feb (138) + value of "Debt in N+1 for Jan (227)

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.