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! Learn more

Reply
Anonymous
Not applicable

Problems with decimals

Hi everyone,

 

I have a datum in format decimal(19,4) that comes from my database with SQL quering.

If I extract it in Power BI, in the data sheets, I obtain it correctly, as shown with 15 decimals.

 

gauzolino_0-1621586945197.jpeg

 

But, when I use it in a visualization tool, either in a measure or directly, it changes:

gauzolino_1-1621587047155.png

This is a problem in a calculation that I made and that is shown in the replies

 

I know that Power BI uses float number, so this could be the problem...but, how can I solve it?

I tried CONVERT(FLOAT(53),("datum") in the SQL editor and the problem doesn't disappear.


Using a function like TRUNC/ROUND solves it but I cannot repeat this function in every measure, I'd like to have something more generic.

 

Any suggestion? Thanks.

 

3 REPLIES 3
v-angzheng-msft
Community Support
Community Support

Hi, @Anonymous 

 

Could you please consdier sharing a simple sample file without any sesentive information for further discussion?

Then I can try to look into it and maybe get a specific solution for you.

 

 

Best Regards,
Community Support Team _ Zeon Zheng

 

 

amitchandak
Super User
Super User

@Anonymous , You can set number of decimal place in column tools , once click on column in field list

 

Data Format New Rib.png

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Thanks @amitchandak . 

The problem is that this setting is visualization...but the data is always different
I explain it better with an example:

I made the sum in the red box, and it is quite zero

gauzolino_1-1621589866773.png

...but not exaclty zero!

gauzolino_2-1621589888217.png

 



So... if I divide the number for this red box, I obtain the green box!

Because Power BI divides a number for a "quite" zero...and the result is very big!


If this were exaclty zero...I would have N/ 0 = 0
instead... I have N / 0,000000000057 = 68937.....

 



Helpful resources

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

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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