Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
Nhiiiii
Helper I
Helper I

Add zero to value

Nhiiiii_0-1684486033613.png

Hi everyone!!!!

Please help me. Do you know formula to create "custom" column the same picture?

Thank you so much!!!!

1 ACCEPTED SOLUTION

pls try this

[
f = Text.Length([DATA]),
to= if f < 3 then Text.Repeat("0",3-f) & [DATA] else [DATA]
][to]

Screen Capture #1189.png

View solution in original post

5 REPLIES 5
Ahmedx
Super User
Super User

pls try this

 

 

if List.ContainsAny({[site ID]},{"0".."9"}) 

then "0" & [site ID] else [site ID]

 

 

Screen Capture #1133.png

Hi, so do you know anyway convert to 3 characters for number??? 

ex: 1 to 001;

     2 to 002;

    10 to 010....

but if A2, P100, I205 still not change.

Thank you!!!

pls try this

[
f = Text.Length([DATA]),
to= if f < 3 then Text.Repeat("0",3-f) & [DATA] else [DATA]
][to]

Screen Capture #1189.png

Your solution is perfect. It helped me solve the problem. Thank you so much!!!

 

thank you so much!!!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.