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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
rpinxt
Power Participant
Power Participant

Number formatting after excel import

Have on sharepoint this excel file:

rpinxt_0-1668779073440.png

As you see the config has a leading zero. And that is what I want.

I did this with custom formatting in excel not with adding a ' in front of it.

 

But when I import it in power bi :

rpinxt_1-1668779211719.png

Gone is the leading zero.

 

Is there a way to get the leading zero back in the original column?

Or will I have to make a measure or calculated column for that?

 

1 ACCEPTED SOLUTION
rpinxt
Power Participant
Power Participant

Thanks both but I found the way to fix this in Power BI.

rpinxt_0-1668781945022.png

So formatted it as a whole number and in the model view you can go to formatting in the properties pane.

Chose your field.

Set format to custom and for me only had to format it like 00

 

rpinxt_1-1668782059478.png

All good now 😄

 

View solution in original post

4 REPLIES 4
rpinxt
Power Participant
Power Participant

Thanks both but I found the way to fix this in Power BI.

rpinxt_0-1668781945022.png

So formatted it as a whole number and in the model view you can go to formatting in the properties pane.

Chose your field.

Set format to custom and for me only had to format it like 00

 

rpinxt_1-1668782059478.png

All good now 😄

 

playtunes
New Member

Screenshot (31).png

 You can try to format the column and add a prefix ("0"). The type will be changed to text

FreemanZ
Super User
Super User

Try to format the config column as TEXT in Excel. After loaded to Power Query, check if the column is converted to number in the step named "Changed Type". You can delete the steps named "Changed Type" added automatically.

@FreemanZ when I format in excel as Text I again lose the leading zero already in excel.

 

Will I then get it back in power query?

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.