Forum Discussion
Wickin
8 years agoFrequent Visitor
Calculate difference between two rows by using Index column
Hi al, I know this question has been asked before, but I tried them all and wasn't able to compete. Sorry! I've got the below table (4 colums) within Power BI (just created a table in Excel t...
- 8 years ago
try this
Column = VAR Index = 'Table'[Index] VAR Reference = 'Table'[Reference] VAR PrevKilometers = CALCULATE ( FIRSTNONBLANK ( 'Table'[Kilometers], TRUE () ), FILTER ( 'Table', 'Table'[Index] = Index - 1 && 'Table'[Reference] = Reference ) ) RETURN IF ( ISBLANK ( PrevKilometers ), BLANK (), 'Table'[Kilometers] - PrevKilometers )
usmanaziz
6 years agoRegular Visitor
based on the formula provided below i have done on my data set but error is coming. kinldy guide me urgently.