Forum Discussion
JoaoMS
Helper III
3 years agoCreate colum with the difference of two rows
Hi all, I've been trying to figure out how to create a new column in Power Query in order to calculate the difference between two values of some columns. Every day we get data of Accumulated Oper...
- 3 years ago
Hi,
You may download my PBI file.
Hope this helps.
vicky_
Super User
3 years agomotor 1 day =
var previousValue = CALCULATE(max('Table'[m1]), FILTER('Table', 'Table'[date] < EARLIER('Table'[date])))
return IF(previousValue > 0, 'Table'[m1] - previousValue)Try this formula.
JoaoMS
Helper III
3 years agoHi, it works fine for DAX, however we need to create these columns in Power Query because after that we need to do some unpivot and pivot actions.
Thanks.