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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
lastnn30
Post Patron
Post Patron

adding zeros to make all numbers 3 digits using Power Query.

Hi

In Power Query, how can I make sure all numbers in a column are for example 3 digits. For example if I have number like 6 then I want it to be 006 if the number was 10 I want it 010, if  a number is 333, it will stay as it is. Thank you very much for your help in advanced.

1 ACCEPTED SOLUTION
rsbin
Super User
Super User

@lastnn30 ,

A quick google search gave me these links:
https://radacad.com/add-leading-zeros-to-a-number-in-power-bi-using-power-query

https://gorilla.bi/power-query/add-leading-zeros/

 

Please note that adding leading zeros will convert your numerical columns into text columns.

Hope this helps.

Regards,

View solution in original post

1 REPLY 1
rsbin
Super User
Super User

@lastnn30 ,

A quick google search gave me these links:
https://radacad.com/add-leading-zeros-to-a-number-in-power-bi-using-power-query

https://gorilla.bi/power-query/add-leading-zeros/

 

Please note that adding leading zeros will convert your numerical columns into text columns.

Hope this helps.

Regards,

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.