Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!
Hi all,
I have a table as shown below.
All I want to do is, create a column which shows the difference of the parameters relative to the previous day for all units. Been browsing all over but didn't manage to find a solution. Thank you for your time
Solved! Go to Solution.
maybe Johnt75 forgot to -1 for CurrentDate. like:
Diff to prev day =
VAR CurrentDate = 'Table'[Date]
VAR CurrentUnit = 'Table'[Unit]
VAR CurrentValue = 'Table'[Parameter]
VAR PrevValue =
LOOKUPVALUE (
'Table'[Parameter],
'Table'[Date], CurrentDate-1,
'Table'[Unit], CurrentUnit,
0
)
RETURN
CurrentValue - PrevValue
You could add a column like
Diff to prev day =
VAR CurrentDate = 'Table'[Date]
VAR CurrentUnit = 'Table'[Unit]
VAR CurrentValue = 'Table'[Parameter]
VAR PrevValue =
LOOKUPVALUE (
'Table'[Parameter],
'Table'[Date], CurrentDate,
'Table'[Unit], CurrentUnit,
0
)
RETURN
CurrentValue - PrevValue
maybe Johnt75 forgot to -1 for CurrentDate. like:
Diff to prev day =
VAR CurrentDate = 'Table'[Date]
VAR CurrentUnit = 'Table'[Unit]
VAR CurrentValue = 'Table'[Parameter]
VAR PrevValue =
LOOKUPVALUE (
'Table'[Parameter],
'Table'[Date], CurrentDate-1,
'Table'[Unit], CurrentUnit,
0
)
RETURN
CurrentValue - PrevValue
hi @Anonymous
something like this shall also work, right?
Since I am new to Power BI I can't tell if this should work or not, but when I tried it for my model it didn't 😞
Thank you for your answer but it doesn't work since the assigned value for the PrevValue is same as the Current Value. Hence, the returning value is always 0. I think we should change the date in the lookupvale part to previousday, but I do not know how.
@johnt75 I created another column using NEXTDAY and assigned the date in lookupvalue to the created NEXTDAY. That way I fixed it. Thank you
Vote for your favorite vizzies from the Power BI World Championship submissions!
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 65 | |
| 52 | |
| 45 | |
| 23 | |
| 21 |
| User | Count |
|---|---|
| 141 | |
| 114 | |
| 50 | |
| 37 | |
| 30 |