Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Power BI : Previous Day Value

Hi, I have table like below, for each Loan ID, there are values assigned to it for every date. 

InputPic.PNG

 What I need is, a new calculated column to be created which will store the value of previous day for the same loan.

 

sahildoshi_0-1602169651052.png

 

What I have tried so far are below two DAX but it is populating Blank value only throughout.

 

1. Previous Day Value = CALCULATE(MAX(Table[Value]), DATEADD('Date_Dim'[Date], -1, DAY))
2. Previous Day Value = CALCULATE(MAX(Table[Value]), PREVIOUSDAY('Date_Dim'[Date]))
 
I do have a Date/Calendar table in place. Please help me creating a new column. The reason I need a column instead of measure is that I need it for future calculations. @amitchandak @GilbertQ  
1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , What you showing should work as a measure with date table.

 

In case you need a column

Last Day = sumx(Filter(table, [Date] =earlier([Date])-1 && [loan id] = earlier([loan id])), [Value])

 

Day Intelligence - Last day, last non continous day (Column /measure)
https://medium.com/@amitchandak.1978/power-bi-day-intelligence-questions-time-intelligence-5-5-5c3243d1f9

 

 

Please provide your feedback comments and advice for new videos
Tutorial Series Dax Vs SQL Direct Query PBI Tips
Appreciate your Kudos.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@Anonymous , What you showing should work as a measure with date table.

 

In case you need a column

Last Day = sumx(Filter(table, [Date] =earlier([Date])-1 && [loan id] = earlier([loan id])), [Value])

 

Day Intelligence - Last day, last non continous day (Column /measure)
https://medium.com/@amitchandak.1978/power-bi-day-intelligence-questions-time-intelligence-5-5-5c3243d1f9

 

 

Please provide your feedback comments and advice for new videos
Tutorial Series Dax Vs SQL Direct Query PBI Tips
Appreciate your Kudos.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
SteveCampbell
Memorable Member
Memorable Member

Previous Day Value = 
var _dt = Table[Date]

RETURN

CALCULATE( 
    MAX( Table[Value] ),
    ALLEXCEPT( Table, Table[Loan ID] ),
    Table[Date] = _dt
)


Did I answer your question? Mark my post as a solution! Proud to be a Super User!


Connect with me!
Stay up to date on  
Read my blogs on  



Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.