cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
rpinxt
Post Prodigy
Post Prodigy

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
Post Prodigy
Post Prodigy

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
Post Prodigy
Post Prodigy

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
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors