Forum Discussion
rahul_sudhakar
6 years agoRegular Visitor
Calculating based on previous row same column
In Power BI is it possible to refer the new column previous row value?. I have an excel that looks like this with columns Date, Actual, Planned and Expected The formula for Expected colu...
- 6 years ago
amitchandak
6 years agoSuper User
rahul_sudhakar , Try like
Expected =
var _maxA = maxx(filter(Table, not(isblank(table[Actual]))),Table[Date])
return
CALCUALTE(sum(Table[Actual]), filter(all(Table),Table[Date]=_maxA)) + CALCUALTE(sum(Table[Planned]), filter(all(Table),Table[Date]>=_maxA && Table[Date]<=max(Table[Date])))