i want to retrieve previous row Net Price for same article code and compare it with present row netprice and store the prevnetprice and calculate the price change. need to store the price change and MRINDate (PODATE) of change. if only 1 row of Article code the compare the netPrice with MaterUnitPrice and store the change in price and MRINDate of change
i have sorted the original table on ArticleCode and MRINDate . Tried using DAX and power query, but unable to compare the currentrow NetPrice with PrevRowNetPrice
Articlecode NetPrice MRINDate MasterUnitPrice
1-101-100 10.00 10 aug 2022 11
1-101-101 .06 11dec 2022 1.0
1-101-101 1.2 21dec 2022 2.2
1-101-101 .07 1 jan2023 1.0
1-101-101 .09 12jan2023 .06
result i require is added columns in the same row
price Change MRINDATE of change
-1.00 10aug2022
-9.94 11dec2022
+1.14 21dec2022
-1.13 1jan2023
+.02 12jan2023
if no change then price change is 0 and MRINDate of change is null or blank
cost21Sept’23withSortedTableRestInBiWorkingPerfectSORTORDERING.pbix (294.0 KB)