Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
In the load function, I would like to test if my WEEK is with 2 digits and if not I would like to add a Zero before.
The below expression doesn't work 🙂
someone could help me ?
LOAD
Year&
if(len([Week]>1),[Week],'0'&[Week]) as ID_Temps,
...
FROM ...
Thank you in advance,
Patrick
Try this?
IF(Len(Week) < 2, 0&Week, Week)
OR
if(len([Week]) >1, [Week], 0&[Week]) as ID_Temps,
Try this?
IF(Len(Week) < 2, 0&Week, Week)
OR
if(len([Week]) >1, [Week], 0&[Week]) as ID_Temps,
Try below expression
if(Len(Week)=1, 0 & [Week], [Week]) as ID_Temps
What results are you getting with that expression?
Maybe:
if(len([Week]>1),text([Week]),text('0'&[Week])) as ID_Temps,
It works, thank you 🙂
This expression works also (and it's more simple from my point of view 😉
thank you for all
the result is that a Zero was added before my number with 1 digit . I have 01 instead 1 and for the number like 10, 11, 12 they stay as they are 😉