March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
the dax below was working fine yesterday, today it is not anymore, don't know what happened
Md. Real Resolucao =
VAR Duration =
AVERAGE (Tickets2016[Tempo Real Resolucao - Segundos])
VAR Hours =
ROUNDDOWN ( Duration / 3600, 0 )
VAR Minutes =
ROUNDDOWN ( ( Duration - ( Hours * 3600 ) ) / 60, 0 )
VAR Seconds =
MOD ( Duration - ( Hours * 3600 ), 60 )
VAR H =
IF ( LEN ( Hours ) = 1,
CONCATENATE ( "0", Hours ),
CONCATENATE ( "", Hours )
)
VAR M =
IF (
LEN ( Minutes ) = 1,
CONCATENATE ( "0", Minutes ),
CONCATENATE ( "", Minutes )
)
VAR S =
INT(IF (
LEN ( Seconds ) = 1,
CONCATENATE ( "0", Seconds ),
CONCATENATE ( "", Seconds )
))
RETURN
CONCATENATE (
H,
CONCATENATE ( ":", CONCATENATE ( M, CONCATENATE ( ":", S ) ) )
)
Solved! Go to Solution.
You have substituted periods for commas in almost every VAR statement.
Proud to be a Super User!
Can you be more specific? In what way is it not working?
Proud to be a Super User!
it says there is sintax errors.
I'm not getting any error messages when I copy your formula into my test data. Works just fine. Are you sure you haven't accidentally deleted a comma or a parentheses somewhere when you tried to enter it? What exactly does the syntax error message say?
Proud to be a Super User!
the sintax '0' is incorrect. (DAX(VAR Duration = AVERAGE (Tickets2016[Primeira Resposta Duracao Segundos])VAR Hours = ROUNDDOWN ( Duration / 3600. 0 )VAR Minutes = ROUNDDOWN ( ( Duration - ( Hours * 3600 ) ) / 60. 0 )VAR Seconds = MOD ( Duration - ( Hours * 3600 ), 60 )VAR H = IF ( LEN ( Hours ) = 1. CONCATENATE ( "0", Hours ), CONCATENATE ( "", Hours ) )VAR M = IF ( LEN ( Minutes ) = 1. CONCATENATE ( "0", Minutes ), CONCATENATE ( "", Minutes ) )VAR S = INT(IF ( LEN ( Seconds ) = 1. CONCATENATE ( "0", Seconds ), CONCATENATE ( "", Seconds ) ))RETURN CONCATENATE ( H, CONCATENATE ( ":", CONCATENATE ( M, CONCATENATE ( ":", S ) ) ) ))).
You have substituted periods for commas in almost every VAR statement.
Proud to be a Super User!
That's what happend, had to change my pc settings to make a software work, good call. thanks
If i fix the "0" on rounddown it says that concatenate is wrong now
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
133 | |
90 | |
88 | |
64 | |
58 |
User | Count |
---|---|
203 | |
141 | |
107 | |
73 | |
70 |