Forum Discussion

Hannisky's avatar
Hannisky
Frequent Visitor
3 years ago
Solved

Create table with group and cummulative sum

Hi all. Could use some help 🙏 Not sure if this is done easier in Power Query or DAX, either works for me.  I need to create a custom table based off of transactions for stock changes. The tricky...
  • amitchandak's avatar
    3 years ago

    Hannisky , Create a date table, join with date of you table, add month end date date if needed as column

     

    and try a measure like

     

    Cumm Sales = CALCULATE(SUM(Table[Cost Amount Actual]),filter(all('Date'),'Date'[date] <=max('Date'[date])))

     

    Cumm Sales = CALCULATE(SUM(Table[Cost Amount Actual]),filter(allselected('Date'),'Date'[date] <=max('Date'[date])))