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
Anonymous
Not applicable

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 @Anonymous ,

 

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 @Anonymous ,

 

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.

 

Anonymous
Not applicable

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 @Anonymous ,

 

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.

 

Anonymous
Not applicable

thanks a lot! It works perfectly 😎

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.