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!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hi
I need to calculate difference in stock day by day, but sometime previous day doesn't exists.
How can I solve that?
I have tried with the formula below, but it doesn't work when previous day doesn't exists.:
Any suggestions?
Solved! Go to Solution.
@LotteLaugesen Don't use PREVIOUSDAY but rather calculate the previous day using MAXX and filter by days less than the current row. That will give you the latest previous day that you have. Then you can use that to calculate that previous day's value.
https://community.powerbi.com/t5/Quick-Measures-Gallery/Lookup-Min-Max/m-p/985814#M434
@Greg_Deckler Thank you for answering, but I can't make work.
I have made this measure:
It seems that it gives the same date not the prior.
And when I try to use in a filter I get an error
So what am I doing wrong?