Forum Discussion

CornelisV's avatar
CornelisV
Helper IV
1 year ago
Solved

Cumulative sum from different categories in same plot/table

Dear all,   we are struggling for finding the best method to apply cumulative sum from two different categories and putting into the same table and plot. As Main source, here is the table: ...
  • Sachin001's avatar
    1 year ago

    CornelisV Find steps below: 

     

    Created a  table using your data:

     

    for year 2024 cumulative sum will start as 13 not 19 as 8+1+4 = 13

     

     

     

    1. Create new column as a Year and Day. 

    2. Create cummulative Column with below dax code:

     

    Column Running Total =

     CALCULATE(
          Sum('Table (4)'[Score]),
            'Table (4)'[Date] <= EARLIER('Table (4)'[Date]),
            'Table (4)'[Year] = EARLIER('Table (4)'[Year]),
            ALL('Table (4)')
            )
     
     
     
    Result :  

     

    let me know if this helps