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
Allav
Frequent Visitor

Creating a cumulative sum based on filters in the table

Hi All,

 

I am struggling to solve the below case. I want to do a cumulative sum of the "dosage" column based on the "Case ID_Milestone" key and runing based on the "date" column. instead, I am getting a sum of all the dosage of all the dates combined, not as runing total based on the date. what am I missing?

 

also, I would like to add another column of the cumulative %, would appreciate your suggestions on how to do it as wellimage.png

1 ACCEPTED SOLUTION
Allav
Frequent Visitor

was able to solve it! I used:

 

Cumulative Dosage =

CALCULATE

(SUM ('Daily Dosage'[Dosage]),

FILTER(ALLEXCEPT('Daily Dosage','Daily Dosage'[Case ID_Milestone]),

('Daily Dosage'[date]<=EARLIER('Daily Dosage'[date]))))

 

basically changed the MAX to EARLIER and it worked!

View solution in original post

1 REPLY 1
Allav
Frequent Visitor

was able to solve it! I used:

 

Cumulative Dosage =

CALCULATE

(SUM ('Daily Dosage'[Dosage]),

FILTER(ALLEXCEPT('Daily Dosage','Daily Dosage'[Case ID_Milestone]),

('Daily Dosage'[date]<=EARLIER('Daily Dosage'[date]))))

 

basically changed the MAX to EARLIER and it worked!

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.