Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago

Formatting a DATEDIFF (DAY & MINUTE) Column

Hi,

I am trying to create a Measure that will provide the format as below:

 

xD  xH  xM   --->  (D=days, H=hours, M=minutes)

 

I have two DATEDIFF columns, one providing calculation in DAYS and other in MINUTES.  Some of the DATEDIFF are going to calculate a NEGATIVE duration.  That is what I am trying to format in a understandable way.  Everything I have tried is not showing correct values.

I basically need the value to calculate the same way for NEGATIVE duration as it does for POSITIVE duration.  For some reason, the NEGATIVE duration is not right.

 

I have attached a sample data file.  Any help would be appreciated.

file is .xlsx, but I am doing this in .pbix

https://1drv.ms/x/s!AkTVm4RCBslhgd5Xnw3rnW2mIqlbbg?e=JNKWdt 

No Replies