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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Zael-Leonhart
Helper II
Helper II

Would like to ask how can we easily count a decimal places of a value

Would like to ask how can we easily count a decimal places of a value  to dynamically change the decimal place based on the input value of the client

 

for example,

 

he input 0.0001

 

it is good because it just a default..

 

but if he input 1.00000 or 1.0 or 1.00

 

would like to adjust the output in a gallery whose decimal places are same with the input.. it usually removes the zeros

 

any idea is appreciated thanks so much

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Zael-Leonhart ,

 

By the design of power bi, it does convert numbers like 1.00 to 1, so consider setting it to text type to keep the original formatting.

You can remove the automatically added change type step in the power query editor and the data will remain in the original text format.

vkaiyuemsft_0-1712627999068.png

 

If you want the numbers to participate in the numeric calculations in dax, you can use the value function, which converts a text string representing a number to a number. More information can be found in the documentation: VALUE function (DAX) - DAX | Microsoft Learn.

 

If your Current Period does not refer to this, please clarify in a follow-up reply.

 

Best Regards,

Clara Gong

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi @Zael-Leonhart ,

 

By the design of power bi, it does convert numbers like 1.00 to 1, so consider setting it to text type to keep the original formatting.

You can remove the automatically added change type step in the power query editor and the data will remain in the original text format.

vkaiyuemsft_0-1712627999068.png

 

If you want the numbers to participate in the numeric calculations in dax, you can use the value function, which converts a text string representing a number to a number. More information can be found in the documentation: VALUE function (DAX) - DAX | Microsoft Learn.

 

If your Current Period does not refer to this, please clarify in a follow-up reply.

 

Best Regards,

Clara Gong

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
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.