Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi
I need to create DAX measurement to calculate the timing ( Timer) from Issued time to current time.
Solved! Go to Solution.
Hi @mifrasmm
The DATEDIFF function will return a number based on the difference between two times in your interval of choice. In the below example it returns the number of Seconds, but you can chose MINUTES, HOURS, DAYS etc.
NOW() returns the current time to the second.
Seconds = DATEDIFF([Column1],NOW(),SECOND)
Hi @mifrasmm,
You could try with DATEDIFF method with interval is second. after that convert to format you want: hh:mm:ss by topic
Create calculated column:
Duration in second = DATEDIFF(Sheet1[ISSUED_DATE],NOW(),SECOND)
Format your timing:
Timer = RIGHT ( "0" & INT (Sheet1[Duration in second] / 3600 ), 2 ) & ":" & RIGHT ( "0" & INT ( (Sheet1[Duration in second] - INT (Sheet1[Duration in second]/ 3600 ) * 3600 ) / 60 ), 2 ) & ":" & RIGHT ( "0" & MOD (Sheet1[Duration in second], 3600 ), 2 )
Hi @mifrasmm
The DATEDIFF function will return a number based on the difference between two times in your interval of choice. In the below example it returns the number of Seconds, but you can chose MINUTES, HOURS, DAYS etc.
NOW() returns the current time to the second.
Seconds = DATEDIFF([Column1],NOW(),SECOND)
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
98 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
101 | |
86 | |
64 |