Forum Discussion
bmacman
3 years agoFrequent Visitor
Subtracting a column value on one date from the previous data date for a specific device
HI I Have a problem I am trying to figure out. I am fairly new to Power BI. I want to add a column that takes the value of the SMU for a machine name and calculates the difference between it and...
- 3 years ago
bmacman , a new column
new column =
var _max = maxx(filter(Table, [Machine name] = earlier([Machine name]) && [ShiftDateTime] < earlier([ShiftDateTime] ) ),[ShiftDateTime] )
return
[SMU] - maxx(filter(Table, [Machine name] = earlier([Machine name]) && [ShiftDateTime] =_max ),[SMU] )
Power BI DAX- Earlier, I should have known Earlier: https://youtu.be/CVW6YwvHHi8
sgintowt
Helper I
2 years agoThis works great. but how can I calculate the difference between dates in the above example.
The first date should show 0