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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
Sept PBI Carousel

Power BI Monthly Update - September 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

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

Top Solution Authors
Top Kudoed Authors