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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.