Forum Discussion
andysross
9 years agoNew Member
Calculate difference between two rows
speed difference 52 0 63 11 76 13 61 5 How do I create a difference column in power bi like the simple calcula...
- 9 years ago
Yes, measures are often the best solution, but there is a way to do it as a column as well: http://excel-inside.pro/blog/2015/11/05/absolute-and-relative-references-in-power-query/
ImkeF
9 years agoCommunity Champion
Yes, measures are often the best solution, but there is a way to do it as a column as well: http://excel-inside.pro/blog/2015/11/05/absolute-and-relative-references-in-power-query/
andysross
9 years agoNew Member
I ended up using this method. Thankyou
Difference = var A = CALCULATE( MAX('table'[id]))-1 return If('table'[id]=0,'table'[speed], 'table'[speed] - CALCULATE(SUM('table'[speed]),FILTER('table','table'[id] = A)))