Forum Discussion
Anonymous
6 years agoNot applicable
Caculating previous row data
Dear All, Could you please show me how to caculating previous row data. Source: FROM DATE Duration Expected 5/31/2019 5 6/10/2019 2 2 6/24/2019 3 3 7/26/2019 10 4 ...
- 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])
Anonymous
6 years agoNot applicable
amitchandak
Super User
6 years agoAnonymous ,
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.