Forum Discussion
Finding a difference between 2 columns
Good morning,
I have a table with a column titled Status Audit Type. Two of the values in this column are Create and Done and each has a corresponding date/time in another column Titled Status Changed At.
I am needing to find the turn around time from when a message was created and when it was completed (done).
Any suggestions?
Thank you!
Melissa
7 Replies
- amitchandakSuper User
MBWATSON ,
a measure
sumx( Values(Table[message ID]), calculate(datediff(minx(filter(Table, Table[Status Audit Type] ="Create"), Table[Status Changed at]), maxx(filter(Table, Table[Status Audit Type] ="Done"), Table[Status Changed at]), hour)))
For column consider earlier
Power BI DAX- Earlier, I should have known Earlier: https://youtu.be/CVW6YwvHHi8
https://www.youtube.com/watch?v=cN8AO3_vmlY&t=17820s- MBWATSONHelper II
Thank you amitchandak. Should the result come out in hours then? Minutes? A numerical value for date/time?
- amitchandakSuper User
MBWATSON , datediff you can get in hour, minute, second , day
if you need get time, simply date diff two, but that will not sum
You can try like
time(0,0,0) + sumx( Values(Table[message ID]), calculate(datediff(minx(filter(Table, Table[Status Audit Type] ="Create"), Table[Status Changed at]), maxx(filter(Table, Table[Status Audit Type] ="Done"), Table[Status Changed at]), hour)))/24