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,
IF(Len(Week) < 2, 0&Week, Week)
if(len([Week]) >1, [Week], 0&[Week]) as ID_Temps,
It works, thank you :-)
Try below expression
if(Len(Week)=1, 0 & [Week], [Week]) as ID_Temps
This expression works also (and it's more simple from my point of view ;-)
thank you for all
What results are you getting with that expression?
if(len([Week]>1),text([Week]),text('0'&[Week])) as ID_Temps,
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 ;-)
Retrieving data ...