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
kan
Helper I
Helper I

how to round decimal numbers

Hi In one of my reports I have a column name Accounts whose values  needs to be shown as one point after decimal.

Example 222.573 should be shown as 223.6 .

               222.432 should be shown as 222.4

So I tried in modelling tab in power bi desktop with format as decimal number selected 1 for value after decimal point.so far it is good with values

 

But issue here is when I have value like 222.032 it is showing as 222.0(because of formatting) which really means 222  So is there a way it can be shown as just 222 instead of 222.0 and remaining values as shown above.

 

Thanks..

1 ACCEPTED SOLUTION
v-lili6-msft
Community Support
Community Support

HI, @kan

When you format the data type of one column, the format of the whole column will be the same. So they will be the same format.

But you may try these two ways as reference:

Add a column by this formula:

Column = IF(Table1[Accounts]-INT(Table1[Accounts])>0.4,FORMAT(Table1[Accounts],"0.0"),FORMAT(Table1[Accounts],"0"))

But the data type of this column will be Text.

14.JPG

 

another use the same formula to add a column, now the data type is Text, then change the data type to Decimal Number

15.JPG

Now it will show the format as what you want in the data view, but in the report visual it will show the same format as others.

 

 

Best Regards,

Lin

Community Support Team _ Lin
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

2 REPLIES 2
v-lili6-msft
Community Support
Community Support

HI, @kan

When you format the data type of one column, the format of the whole column will be the same. So they will be the same format.

But you may try these two ways as reference:

Add a column by this formula:

Column = IF(Table1[Accounts]-INT(Table1[Accounts])>0.4,FORMAT(Table1[Accounts],"0.0"),FORMAT(Table1[Accounts],"0"))

But the data type of this column will be Text.

14.JPG

 

another use the same formula to add a column, now the data type is Text, then change the data type to Decimal Number

15.JPG

Now it will show the format as what you want in the data view, but in the report visual it will show the same format as others.

 

 

Best Regards,

Lin

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

hi, @kan

Could you please tell me if your problem has been solved? If it is, could you please mark the helpful replies as Answered?

 

Best Regards,

Lin

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

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.