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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Smackcat
Helper I
Helper I

Sum of a measure in the total column

Hi experts

 

I have the following table:

WeekKPI_AMeasure(KPI_B)Measure(Dif)
110  
212102
314122
416142
TOTAL52520

 

I've created a measure [KPI_B] that equals the value of [KPI_A] of the previous week. I didn't really care about the total of [KPI_B] (because it's a hidden measure) so for the total I stayed with the sum of [KPI_A], as I can't calculate a previous week.

 

I'm actually having trouble with measure [Dif], that's the difference between [KPI_A] and [KPI_B]. I want to be able to sum measure [Dif] for week 1 to 4 on Total row, so it change from 0 to 6. 

 

WeekKPI_AMeasure(KPI_B)Measure(Dif)
110  
212102
314122
416142
TOTAL52526

6: sum of the measure on weeks 1 to 4

 

Do you think it's possible? Thanks!

 

1 ACCEPTED SOLUTION
Ahmedx
Super User
Super User

write a new measure like this

 

Dif fixed = SUMX (VALUES('table'[week]),[Dif])

 

View solution in original post

2 REPLIES 2
Ahmedx
Super User
Super User

write a new measure like this

 

Dif fixed = SUMX (VALUES('table'[week]),[Dif])

 

Thanks! I really needed this

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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