Forum Discussion

murillocosta's avatar
murillocosta
Helper I
3 years ago
Solved

Last row value same column

Hi, Would someone able to help me to perform the below?   I need to calculate a new column which will get the previous row value of one column and perform the calculation below using two another c...
  • wdx223_Daniel's avatar
    3 years ago
    Total Pallets Hired =
    VAR _sum=SUM('SUMMARIZE'[Total Pallets Hired]) RETURN IF(_sum,_sum,SUMX(FILTER(ALLSELECTED('SUMMARIZE'[Week]),'SUMMARIZE'[Week]<=MAX('SUMMARIZE'[Week])&&CALCULATE(SUM('SUMMARIZE'[Total Pallets Hired]))=0),CALCULATE(SUM('SUMMARIZE'[Total Pallets Hired]),OFFSET(-1,,ORDERBY('SUMMARIZE'[Week])))+[Total Outbound]-[Total Inbound Weekly]))