cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Frequent Visitor

Cumulative total by index and product - so close!

Thanks to the help here I am pretty close to what i'm planning to achieve.

 

The following calculated column measure has helped me 

Cumulative Actual Qty =
CALCULATE(
SUMX(Allocation,Allocation[Allocation Qty]),
FILTER(Allocation,Allocation[PDE] = EARLIER(Allocation[PDE]) && Allocation[Index]<= EARLIER(Allocation[Index])))
 
As pictured the total runs up to every PDE and then restarts again but I would like it to start again when the DC changes.
 
So the numbers restarts at the yellow highlight point, not sure if i need to changer 
 
Thanks in advance!

image.jpg
1 ACCEPTED SOLUTION
Super User IV
Super User IV

@rhys1987, try how

Actual cumulative quantity ?
CALCULATE(
SUMX(Assignment,Assignment[Assignment Quantity]),
FILTER(Allocation,Allocation[PDE] a EARLIER(Allocation[PDE]) && Allocation,Allocation[DC] ? EARLIER(Allocation[DC]) && Allocation[Index]<- EARLIER(Allocation[Index])))



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

View solution in original post

3 REPLIES 3
Super User IV
Super User IV

@rhys1987, try how

Actual cumulative quantity ?
CALCULATE(
SUMX(Assignment,Assignment[Assignment Quantity]),
FILTER(Allocation,Allocation[PDE] a EARLIER(Allocation[PDE]) && Allocation,Allocation[DC] ? EARLIER(Allocation[DC]) && Allocation[Index]<- EARLIER(Allocation[Index])))



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

View solution in original post

Thanks!
First one works, i was doing something similar but couldn't quite see it.

Hi , @rhys1987 

 

Could you please tell me whether your problem has been solved?
If it is,  please mark the helpful replies or add your reply as Answered to close this thread.
More people will learn new things here. If you haven't, please feel free to ask.

 

Best Regards,
Community Support Team _ Eason

Helpful resources

Announcements
secondImage

Happy New Year from Power BI

This is a must watch for a message from Power BI!

December Update

Check it Out!

Click here to read more about the December 2020 Updates!

Community Blog

Check it Out!

Click here to read the latest blog and learn more about contributing to the Power BI blog!

Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

Mark your calendars and join us for our next Power BI Dev Camp!.

Top Solution Authors
Top Kudoed Authors