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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

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
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors