How to return Previous Row value from a Column in Power BI

Scenario:

Suppose we have a Same data as follows..

from this data, column "TotalUnits", we wants generate new calculated column to show the same TotalUnits but the each row value should get from the Previous Row value.

This can be in one of the way, by creating a Index Column on this Table.

The Index Column can be created from Home> Edit Queries > Add Column > Index Column

Next based on this Index Column, we will create a new Calculated Column "PrevRowUnits",

that shows the TotalUnits values that get from the Previous Rows, using the below DAX Expression :

PrevRowUnits = LOOKUPVALUE('Sample'[TotalUnits],'Sample'[Index],'Sample'[Index]-1)+0

Finally the Result is as follows :

Note:

The above Scenario may not be a good, but you can relate it to your own Scenario.

Scenario:

Suppose we have a Same data as follows..

from this data, column "TotalUnits", we wants generate new calculated column to show the same TotalUnits but the each row value should get from the Previous Row value.

This can be in one of the way, by creating a Index Column on this Table.

The Index Column can be created from Home> Edit Queries > Add Column > Index Column

Next based on this Index Column, we will create a new Calculated Column "PrevRowUnits",

that shows the TotalUnits values that get from the Previous Rows, using the below DAX Expression :

PrevRowUnits = LOOKUPVALUE('Sample'[TotalUnits],'Sample'[Index],'Sample'[Index]-1)+0

Finally the Result is as follows :

Note:

The above Scenario may not be a good, but you can relate it to your own Scenario.

*--------------------------------------------------------------------------------------------------------*

*Thanks, TAMATAM ; Business Intelligence & Analytics Professional*

*--------------------------------------------------------------------------------------------------------*