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

Dynamic cumulative sum fill rate

I'd like to create calculated columns to get cumulative sum of sets ordered and sets shipped to have fill rate cumulative data, and if I select more than 2 weeks the calculation considers the data for those dates as the whole range

dynamic cumulated fill rate.jpg

can somebody help?

DateOrderFill RateStatusSets OrderedSets shippedfill ratecumulated sets orderedcumulated sets shippedfill rate **bleep**
19-Apr-21O100151708896.43%Shipped>=95%10945105540.96427610945105540.964275925
19-Apr-21O100151707595.10%Shipped>=95%947790130.95103920422195670.958133386
19-Apr-21O100151519695.87%Shipped>=95%840080530.9586928822276200.958295746
26-Apr-21O100152646788.34%Shipped<95%961284910.88337538434361110.939558724
26-Apr-21O100152464189.43%Shipped<95%1022091400.89432548654452510.930057138
26-Apr-21O100152462996.52%Shipped>=95%963092950.96521358284545460.935865761
1 ACCEPTED SOLUTION

Hi @FerChavirock ,

 

Try:

Measure = 
var ordered_ = CALCULATE(SUM('Table'[Sets Ordered]),ALLSELECTED('Table'))
var shipped_ = CALCULATE(SUM('Table'[Sets shipped]),ALLSELECTED('Table'))
return DIVIDE(shipped_,ordered_,0)

 

 

Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

4 REPLIES 4
V-lianl-msft
Community Support
Community Support

Hi @FerChavirock ,

 

After adding an index column in the query editor, create the following column:

Column = CALCULATE(SUM('Table'[Sets Ordered]),FILTER('Table',EARLIER('Table'[Date])>='Table'[Date]&&'Table'[Index]<=EARLIER('Table'[Index])))

V-lianl-msft_0-1620010511832.png

 

 

Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

thanks for the feedback!

what I am missing now is to have a final fill rate by week, so if I add two or more weeks the fill rate changes accordinglycalculation needed.jpg

Hi @FerChavirock ,

 

Try:

Measure = 
var ordered_ = CALCULATE(SUM('Table'[Sets Ordered]),ALLSELECTED('Table'))
var shipped_ = CALCULATE(SUM('Table'[Sets shipped]),ALLSELECTED('Table'))
return DIVIDE(shipped_,ordered_,0)

 

 

Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

thanks a lot! It works perfectly 😎

Helpful resources

Announcements
MBAS on Demand

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

July 2021 Update 768x460.png

Check it out!

Click here to read more about the July 2021 Updates

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Urdu Hindi D365 Bootcamp 768x460.png

Urdu Hindi D365 Bootcamp

Dont miss our very own April Dunnam’s The Developer Guide to the Galaxy! Find out what the Power Platform has to offer for the traditional developer.

Top Solution Authors
Top Kudoed Authors