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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request 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
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors