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
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Get Ready for Power BI Dev Camp

Power BI Dev Camp - June 24th

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

Top Solution Authors
Top Kudoed Authors