Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
Hi
I'm trying to do solve the next problem and I'm not able.
I've the next table in my BBDD:
Date Qty Prev_week
Date = Day of the record.
Qty = Integer that refers the units of a product
Prev_week = Last day of the previous week (considering Date field).
I want to do a calculated column that shows the Qty value of the record with the Date is equal to the Prev_week of the current record. For example:
Date Qty Prev_week Prev_Qty
20/01/2018 3 14/01/2018 0
21/01/2018 5 14/01/2018 0
22/01/2018 4 21/01/2018 5
I've tried everything that ocurred to me, but I didn't get successful
Thank's in advance
Solved! Go to Solution.
In your scenario, did you mean that the logic to calculate the Prev_Qty is if the current Prev_week equals to Date in prior row, then the Prev_Qty equals to the Qty in prior row?
If so, to achieve your requirement you can refer to following steps:
Prev_Qty = IF ( LOOKUPVALUE ( Table4[Date], Table4[Index], Table4[Index] - 1 ) = Table4[Prev_week], LOOKUPVALUE ( Table4[Qty], Table4[Index], Table4[Index] - 1 ), 0 )
Thanks,
Xi Jin.
In your scenario, did you mean that the logic to calculate the Prev_Qty is if the current Prev_week equals to Date in prior row, then the Prev_Qty equals to the Qty in prior row?
If so, to achieve your requirement you can refer to following steps:
Prev_Qty = IF ( LOOKUPVALUE ( Table4[Date], Table4[Index], Table4[Index] - 1 ) = Table4[Prev_week], LOOKUPVALUE ( Table4[Qty], Table4[Index], Table4[Index] - 1 ), 0 )
Thanks,
Xi Jin.
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
90 | |
87 | |
84 | |
68 | |
49 |
User | Count |
---|---|
131 | |
111 | |
96 | |
71 | |
67 |