Forum Discussion

NewbieJono's avatar
NewbieJono
Post Partisan
4 years ago
Solved

rolling Percentage

Hello, How could i do a rolloing percentage based on the days before in the table   as table below  in the last coloumn (Bold)    e.g in excel for 4th Jan the formula would be =SUM(C4:C7)/SUM(D4:...
  • amitchandak's avatar
    4 years ago

    NewbieJono , With help from date table

     

    Divide(

    CALCULATE(SUM(Table[Col C]),filter(allselected('Date'),'Date'[date] <=max('Date'[date]))) ,

    CALCULATE(SUM(Table[Col D]),filter(allselected('Date'),'Date'[date] <=max('Date'[date])))

    )

     

    or

     

    Divide(

    CALCULATE(SUM(Table[Col C]),filter(allselected('Table'),'Table'[date] <=max('Table'[date]))) ,

    CALCULATE(SUM(Table[Col D]),filter(allselected('Table'),'Table'[date] <=max('Table'[date])))

    )