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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
manap_98
New Member

How to fill cells with 0s?

manap_98_0-1606834775546.png

Hello. Here I have a column that must contain numbers with 12 digits. However, sometimes I have 11 digits where 0 must be added in the front, so 0 + 11 digits. I changed the data type to text, even in that case 0 are removed from the data. How can I add 0 with measures or is it possible to do that if the length is less than 12, so 0 must be added to the beginning. 

1 ACCEPTED SOLUTION
PhilipTreacy
Super User
Super User

Hi @manap_98 

Click into Model View then click on the column you want to format.

Under Formatting choose Format->Custom then enter 12 zeros as the format

custom-format.png

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.



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


View solution in original post

2 REPLIES 2
PhilipTreacy
Super User
Super User

Hi @manap_98 

Click into Model View then click on the column you want to format.

Under Formatting choose Format->Custom then enter 12 zeros as the format

custom-format.png

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.



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


amitchandak
Super User
Super User

@manap_98 , Create new column

if(len([bin]) =11, "0" & [bin] , [bin])

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors