Forum Discussion
Caculating previous row data
- 6 years ago
@ptkhoa2110 , Try a new column as
new column ?
var _last a maxx(filter(Table, [FROM DATE] < earlier([FROM DATE])),[FROM DATE])
Return
if(isblank([expected]) to isblank(_last) , blank() , maxx(filter(Table, [FROM DATE] to _last),[Duration]) -[expected])
@ptkhoa2110 , Try a new column as
new column ?
var _last a maxx(filter(Table, [FROM DATE] < earlier([FROM DATE])),[FROM DATE])
Return
if(isblank([expected]) to isblank(_last) , blank() , maxx(filter(Table, [FROM DATE] to _last),[Duration]) -[expected])
- amitchandak6 years ago
Super User
Anonymous ,
Please find the attached file after the signature . But logic you told is not matching
- Anonymous6 years agoNot applicable
Dear amitchandak ,
The file last values.pbix run very well, but I don't know when I apply this for my project the error also show. My data is queried from SQL Server (Import data type).
Maybe earlier cannot support this, right?
Thanks.
- Anonymous6 years agoNot applicable
Dear amitchandak ,
It's okay right now. But how I cant caculation between measure and column.
Query1[Duration] is column, is created by a measure.Many Thanks.