Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Subtract values from consecutive rows in DAX

 

Demand	AvailableQuantity	
 0	3551 (3551-0)
-300	3251 (3551-300)	            
-250	3001 (3251-250)            
-780	2221 (3001-780)	            
-300	1921 (2221-300)            

 

 

Is there a way to sum two consecutive rows and create a new column in DAX?

 

I want to start from the first row of AvailableQuantity and subtract Demand from second row and keep doing that for all values. 

 

Is this possible in Power BI?