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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Anonymous
Not applicable

Formatting Number

Hi All,

This is my first post to Power BI, I am looking for formattng numbers

I have a column called metrics which has mixed type of values 

MetricsValue
Orders2.00
Revenue10.76
New Customers3.00

 

Now I want to format these numbers in such a way that it shoud be as below and also keep Value as NUmber and not Text.

I have tried creating with Format but ut changes the value to text.

 

MetricsValue
Orders2
Revenue10.76
New Customers3
1 ACCEPTED SOLUTION
Anonymous
Not applicable

HI @Anonymous,


If you setting 'date type' option to decimal number, format option to general; decimal places to auto, power bi will auto hide the decimal part of whole number.

 

13.PNG

 

Regards,

Xiaoxin Sheng

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

HI @Anonymous,


If you setting 'date type' option to decimal number, format option to general; decimal places to auto, power bi will auto hide the decimal part of whole number.

 

13.PNG

 

Regards,

Xiaoxin Sheng

Hey Xiaoxin, 

 

Can you help me keep trailing zeros on the end of my decimal numbers, but only if the zeros exist? (in other words, don't add trailing zeros if they don't exist). I want to keep my column datatype as a number, not text. 

 

Take this subset of data {44.1, 44.10, 44.100}. I am using these values to rank data, so differentiating between the numbers after the decimal (1, 10, 100) is important. 

 

If the datatype is set to "Decimal Number", then Power BI removes the trailing zeros after the decimal, by default.
E.g. 44.10  --> 44.1
Eg. 44.100 --> 44.1


If I then set the number of desired decimal places, for example to "3", then PBI adds extra zeros where I don't want them. 

E.g. 44.1   --> 44.100
E.g. 44.10 --> 44.100

 

What I'd like: 

44.1

44.10

44.100

 

Let me know!

Thanks, T

hi! you can get this only in Text format. Check your power query code, it is trying to change format to decimal for you like this:
= Table.TransformColumnTypes(Source,{{"Column1", type number}})

You need to replace it with number with text:

= Table.TransformColumnTypes(Source,{{"Column1", type text}})

alena2k
Resolver IV
Resolver IV

Capture.PNG

 

Please look under Modeling in Desktop as shown above or you can set type on column in Query Editor.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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