Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi @Paulyeo11
Add a Custom Column with this line of code
if Text.Length([SAL_C]) = 2 then Text.Insert([SAL_C], 1, "0") else [SAL_C])
Regards
Phil
If I answered your question please mark my post as the solution.
If my answer helped solve your problem, give it a kudos by clicking on the Thumbs Up.
Proud to be a Super User!
Hi @Paulyeo11
Add a Custom Column with this line of code
if Text.Length([SAL_C]) = 2 then Text.Insert([SAL_C], 1, "0") else [SAL_C])
Regards
Phil
If I answered your question please mark my post as the solution.
If my answer helped solve your problem, give it a kudos by clicking on the Thumbs Up.
Proud to be a Super User!
Hi Phil
Thank you for your sharing.
Paul Yeo
Hi, @Paulyeo11
According to your description, you want to insert “0” into the value which has two characters, you can try this calculated column:
SAL_C1 =
SWITCH(
LEN([SAL_C]),
2,LEFT([SAL_C],1)&"0"&RIGHT([SAL_C],1),
3,[SAL_C],
BLANK())
And you can get what you want, like this:
You can download my test pbix file here
Best Regards,
Community Support Team _Robert Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Robert
I will try your suggestion . Thank you very much for sharing .
The last time I try using Amit approach , after that I get wrong target amount , may be it is due to I forget to change change the target table GROUP value label from G1 to G01
@Paulyeo11 , Try a new column like
if(len([sal_c]) =2 , left([sal_c],1) & "0" & right([sal_c],1) ,[sal_c])
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 | |
99 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
102 | |
87 | |
64 |