Forum Discussion
TimeDifference with two times
Hi,
Could please help with the calculation here?
My measure calculation is trying to subtract the times 'sdate' and 'edate' and below should be 2:10 and its displaying as 3:00 on the card.
Is this because Ive used MAX? Ive created another column with the calculation working and displaying 2:10, but I dont know how to reference this in the measure.
Anonymous , the first way to take diff is that you create it as column
New column = [Time1] -[time2]
measure optionsmeasure 1 = sumx(Table, Table[Time1] -Table[time2]) //you can use averageX
calculate( min(Table[Time1] ) -max(Table[time2]) , values(Table[ID])) // force row context, but Gt will wrongrefer for row context
5 Replies
- amitchandakSuper User
Anonymous , the first way to take diff is that you create it as column
New column = [Time1] -[time2]
measure optionsmeasure 1 = sumx(Table, Table[Time1] -Table[time2]) //you can use averageX
calculate( min(Table[Time1] ) -max(Table[time2]) , values(Table[ID])) // force row context, but Gt will wrongrefer for row context
- AnonymousNot applicable
Thankyou amitchandak as always 🙂
- AnonymousNot applicable
Hi amitchandak ,
Would it still be SUMX with below?
IF(SUMX(RoomUtilisation, RoomUtilisation[New End Date]>[ParameterEndDate]),0,1)?
Would this be a different operator?
Thanks
- amitchandakSuper User
Anonymous , what are you try to achieve here ?