Forum Discussion
jiangxm80
Helper I
3 years agoCalculate the value from previous row
I have a table as the following. Column1 Column2 A 1000 B 800 B 500 B 300 I would like to create one more column Col...
- 3 years ago
Hi,
I assume the order is by column 2.
Please check the below picture and the attached pbix file.
Column3 CC = VAR _number = MAXX ( FILTER ( Data, Data[Column2] < EARLIER ( Data[Column2] ) ), Data[Column2] ) RETURN IF ( NOT ISBLANK ( _number ), Data[Column2] - _number, Data[Column2] )
Jihwan_Kim
Super User
3 years agoHi,
I assume the order is by column 2.
Please check the below picture and the attached pbix file.
Column3 CC =
VAR _number =
MAXX (
FILTER ( Data, Data[Column2] < EARLIER ( Data[Column2] ) ),
Data[Column2]
)
RETURN
IF ( NOT ISBLANK ( _number ), Data[Column2] - _number, Data[Column2] )
- jiangxm803 years ago
Helper I
resolved, perfect!