Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Could you help me with a DAX formula for the sum of time that goes by 24h. According to the sample print, in my example, when I try to calculate the TOTAL TIME and TOTALTIME * COUNT columns, I have the return according to line 1 when the right one would be the result of line 2
DAX Mode ( In this mode you can agregate for any dimension)
QtSegundos = SUM([Seconds])
Time= VAR Horas = INT([QtSegundos]/3600) VAR Minutos = INT(([QtSegundos] - (Horas * 3600))/60) VAR Segundos = MOD([QtSegundos];60) RETURN Horas&":"&FORMAT(Minutos;"00")&":"&FORMAT(Segundos;"00")
I'm assuming you're talking about "durations", or an amount of time, rather than a time of day. Try setting your data types to duration, and then you can simply add them together.
When you load it in, you'll get decimal numbers representing days, or 24-hour increments. You can then make measures accordingly to display however you want.
I'll try that, and let me know if it worked.
Hi
HOUR returns the integer, so that will work here.
Hope this helps.
Thanks
Raj
@Anonymous
Thank you for your help. But the whole hours were just an example, to illustrate the scenario. But I also have minutes and seconds, for example: 11:24:35
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 | |
102 | |
84 | |
79 | |
68 |
User | Count |
---|---|
120 | |
110 | |
94 | |
81 | |
77 |