Forum Discussion

jhsimb's avatar
jhsimb
Frequent Visitor
4 years ago
Solved

Cumulative sales

I need the cumulative sales  01 January 2020 - 15 December 2020 (no full month) 01 January 2021 - 15 December 2021     The report is refreshed once a week so both amounts have to increase....
  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi jhsimb ,

    You can refer the solution in the following links to get the culmulative sales:

    Cumulative Total

    Power BI: Calculating Cumulative Totals for Time Periods

    Culmulative sales =
    CALCULATE (
        SUM ( 'Table'[Sales] ),
        FILTER ( ALLSELECTED ( 'Table' ), 'Table'[Date] <= MAX ( 'Table'[Date] ) )
    )

    If the above ones can't help you get your expected result, please provide some raw data(exclude sensitive data) in your model tables, visual settings(slicer and matrix visual) and your expected result with more details(screenshot, special examples, calculation logic etc.) Thank you. 

    Best Regards