Forum Discussion
Power BI : Previous Day Value
Hi, I have table like below, for each Loan ID, there are values assigned to it for every date.
What I need is, a new calculated column to be created which will store the value of previous day for the same loan.
What I have tried so far are below two DAX but it is populating Blank value only throughout.
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-5c3243d1f9Please provide your feedback comments and advice for new videos
Tutorial Series Dax Vs SQL Direct Query PBI Tips
Appreciate your Kudos.
2 Replies
- SteveCampbell
Memorable Member
Previous Day Value = var _dt = Table[Date] RETURN CALCULATE( MAX( Table[Value] ), ALLEXCEPT( Table, Table[Loan ID] ), Table[Date] = _dt ) - amitchandak
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-5c3243d1f9Please provide your feedback comments and advice for new videos
Tutorial Series Dax Vs SQL Direct Query PBI Tips
Appreciate your Kudos.