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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply

How to create column which is cumulative sum of measure

Hi all, 

I have table with 'date' and 'col2'  columns. In this table I also have 'measure1' and 'measure2'. 
In this table I need to create  COLUMN ('col3') , that will be cumulative sum of 'measure1' and   'measure2'. 
Hope this info would be enough.  

1 ACCEPTED SOLUTION

Hii@giorgi_lommidd,

 

Create two measures:

 

Measure = [measure1]+[measure2]
 
Cumulative Total measure =
IF(MIN(Sheet1[date])<=CALCULATE(MAX(Sheet1[date]),ALL(Sheet1)),CALCULATE([Measure],FILTER(All(Sheet1[date]),Sheet1[date]<=MAX(Sheet1[date]))))
 
you can add only Cumulative Total Measure to the table view.
 
If this helps, mark it as Accept as Solutions,
Thanks,
mohittimpus

View solution in original post

3 REPLIES 3
mohittimpus
Helper V
Helper V

Can you please share a sample data?

Hii@giorgi_lommidd,

 

Create two measures:

 

Measure = [measure1]+[measure2]
 
Cumulative Total measure =
IF(MIN(Sheet1[date])<=CALCULATE(MAX(Sheet1[date]),ALL(Sheet1)),CALCULATE([Measure],FILTER(All(Sheet1[date]),Sheet1[date]<=MAX(Sheet1[date]))))
 
you can add only Cumulative Total Measure to the table view.
 
If this helps, mark it as Accept as Solutions,
Thanks,
mohittimpus

Helpful resources

Announcements
July 2024 Power BI Update

Power BI Monthly Update - July 2024

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

July Newsletter

Fabric Community Update - July 2024

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