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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
PowerBIData
Frequent Visitor

How to get rid of Zero (0) after adding up a column with decimal places

Hi,

Kindly advise if you're able, I have a decimal column datatype decimal on a  Day table as per below example.

Day
0.5
11.0

 

When I add this I get 11.5 which is correct, but when I add 1.0+1.0= 2.0, I would like to get rid of zero if is a whole number

Dax used  Total days=sum('day'.[day])+0

Basically, I would like to get rid of 0 if the sum is equal to a whole number.  Many thanks.

1 ACCEPTED SOLUTION
Jihwan_Kim
Super User
Super User

@PowerBIData 

I suggest using a tabular editor in the Power BI desktop.

The type still remains as a number.

 

Picture1.png

 

https://www.dropbox.com/s/0q2878rl8amj4n4/powerbidata.pbix?dl=0 

 

 

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


View solution in original post

2 REPLIES 2
Jihwan_Kim
Super User
Super User

@PowerBIData 

I suggest using a tabular editor in the Power BI desktop.

The type still remains as a number.

 

Picture1.png

 

https://www.dropbox.com/s/0q2878rl8amj4n4/powerbidata.pbix?dl=0 

 

 

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


selimovd
Super User
Super User

Hey @PowerBIData ,

 

you can do that with DAX and the FORMAT function.

Check that article on how to do that:

Dynamic scaling of a measure in Power BI with DAX - What the fact.bi

 

Be aware that FORMAT returns a text. So this measure will work in a table or matrix, but not in other visuals like a bar or line chart.

 

If you need any help please let me know.
If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
 
Best regards
Denis
 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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