Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Cumulative values from Specific Date

Hello ,    Let's say I have a Forecast table with the following data     Date Sales 05/2022 10 06/2022 20 07/2022 30 08/2022 40 09/2022 50 10/2022 60   I need to...
  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi Anonymous ,

     

    Here I create a sample to have a test and I think you can try below code to create a measure.

    Sample:

    Measure:

    Measure = 
    VAR _START = EOMONTH(TODAY(),-2)+1
    RETURN
    CALCULATE(SUM('Table'[Sales]),FILTER(ALL('Table'),'Table'[Date]>=_START&&'Table'[Date]<=MAX('Table'[Date])))+0

     Result is as below.

     

    Best Regards,
    Rico Zhou

     

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