Forum Discussion
Get previous row value
- 4 years ago
Hi, Anonymous
An optional option:
Step 1: Create an index column (you can add an index column through the UI in PowerQuery)
Step 2: Create the following measure_getResult = var _currentIndex=MAX('Table'[Index]) return CALCULATE([My measure1 as Measure],FILTER(ALL('Table'),'Table'[Index]=_currentIndex-1)) ////Assuming [My measure1 as Measure] is your measure1Result:
Please refer to the attachment below for details. Hope this helps.
If this doesn't work for you, please consider sharing a sample.
How to provide sample data in the Power BI Forum
How to Get Your Question Answered Quickly
Best Regards,
Community Support Team _ Zeon ZhengIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, Anonymous
An optional option:
Step 1: Create an index column (you can add an index column through the UI in PowerQuery)
Step 2: Create the following measure
_getResult =
var _currentIndex=MAX('Table'[Index])
return
CALCULATE([My measure1 as Measure],FILTER(ALL('Table'),'Table'[Index]=_currentIndex-1))
////Assuming [My measure1 as Measure] is your measure1
Result:
Please refer to the attachment below for details. Hope this helps.
If this doesn't work for you, please consider sharing a sample.
How to provide sample data in the Power BI Forum
How to Get Your Question Answered Quickly
Best Regards,
Community Support Team _ Zeon Zheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.