Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register 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
User | Count |
---|---|
123 | |
76 | |
62 | |
50 | |
49 |
User | Count |
---|---|
175 | |
125 | |
60 | |
60 | |
58 |