Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago

Running Total...should be so simple??

I am trying to simply sum up the cumulutive (month to month to month...) totals of outstanding inventory demand.  

 

I am using the standard cumulative total pattern...but clearly it is not the right formula to be using.     You can see that this formula is aggregating the total demand (outstanding requirment).   What I need is for each successive month, to add the total of the previous month.   So, for example, the February cumulative demand should be 16,662.    March cumulative demand would be 16,662 + 10,914 (27,576) and so on.   

 

Cumul Demand = CALCULATE(SUM(Flu_PlanPegging[Outstanding Requirement]),
FILTER(ALL('Date Table'[Date]),'Date Table'[Date] <= MAX('Date Table'[Date])))

 

 

5 Replies

  • az38's avatar
    az38
    Icon for Community Champion rankCommunity Champion

    hi Anonymous 

    are you sure your Flu_PlanPegging table has relationships with Date Table?

    even if so, why dont you use date field from Flu_PlanPegging in FILTER() statement?

     

    do not hesitate to give a kudo to useful posts and mark solutions as solution

    • Anonymous's avatar
      Anonymous
      Not applicable

      Yes, I do have a date table, and those relationships exist.   Changing it to the "due date" (which is where the relationship is) has no affect.  

       

  • v-frfei-msft's avatar
    v-frfei-msft
    Icon for Community Support rankCommunity Support

    Hi Anonymous ,

     

    Please kindly make sure you have managed the relationship betweeb Flu_PlanPegging table and date table, then add the measure below:

    Measure = CALCULATE(SUM('Table'[Volume]),FILTER(ALL(Datetable),[Date]<=MAX(Datetable[Date])))

     

    Pbix attached for your reference. If the problem still exists, please share your dummy pbix here that we can check it further. Thanks!

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hello  -  I do not see how to upload any file?    I see lots of other options....but no option to upload a file attachment.

       

       

       

      • v-frfei-msft's avatar
        v-frfei-msft
        Icon for Community Support rankCommunity Support

        Hi Anonymous ,

         

        Kindly share your sample data and excepted result to me if you don't have any Confidential Information. Please upload your files to One Drive and share the link here.