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!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi,
I have an entries with missing dates, need to find previous day value based on data below.
Current formula is taking as sequiance days like 1st, 2nd, 3rd etc:
PreviousDay = CALCULATE(SUM('ZWD_RECON_SUM TableA'[Value]),
PREVIOUSDAY('Date_calender'[Date]))
Below data & excepted output in previous day column.
Thanks
Charan
Solved! Go to Solution.
@Anonymous
I have created 2 calculated columns.
Thie first holds the ranking of the rows and the second calculates the previous value.
I have also attached the PowerBI workspace on this message.
Ranking =
RANKX(
ALL( Sheet1 ),
Sheet1[Start Date],,
ASC,
Dense
)
Previous Value =
VAR _CurrentRowIndex = Sheet1[Ranking]
VAR _PreviousRowIndex = CALCULATE(
MAX(Sheet1[Ranking] ),
FILTER( Sheet1, Sheet1[Ranking] < _CurrentRowIndex ),
ALL( Sheet1[Ranking] )
)
VAR _Result = CALCULATE(
MAX( Sheet1[This Day] ),
FILTER( Sheet1, Sheet1[Ranking] = _PreviousRowIndex )
)
RETURN
_Result
Hi, Thanks for the response, the logic which you provided is not working on my actual data and posted raw data and exepted output here.
Thanks
Charan
@Anonymous
I have created 2 calculated columns.
Thie first holds the ranking of the rows and the second calculates the previous value.
I have also attached the PowerBI workspace on this message.
Ranking =
RANKX(
ALL( Sheet1 ),
Sheet1[Start Date],,
ASC,
Dense
)
Previous Value =
VAR _CurrentRowIndex = Sheet1[Ranking]
VAR _PreviousRowIndex = CALCULATE(
MAX(Sheet1[Ranking] ),
FILTER( Sheet1, Sheet1[Ranking] < _CurrentRowIndex ),
ALL( Sheet1[Ranking] )
)
VAR _Result = CALCULATE(
MAX( Sheet1[This Day] ),
FILTER( Sheet1, Sheet1[Ranking] = _PreviousRowIndex )
)
RETURN
_Result
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 103 | |
| 79 | |
| 57 | |
| 51 | |
| 46 |