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
Anonymous
Not applicable

Unable to change Rounding

Hello Community,

 

Can someone please let me know why the 'Rounding' is greyed out. I would like to change the rounding to 0 decimal places but I'm unable to, see image.

 

rounding.png

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

Hi @Anonymous ,

 

We should change the data type to Percentage.Type firstly. Then we can decimal places in Modeling.

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMtEzVlWK1cFgxAIA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [percentage = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"percentage", Percentage.Type}})
in
    #"Changed Type"

Capture.PNG

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

View solution in original post

7 REPLIES 7
v-frfei-msft
Community Support
Community Support

Hi @Anonymous ,

 

We should change the data type to Percentage.Type firstly. Then we can decimal places in Modeling.

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMtEzVlWK1cFgxAIA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [percentage = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"percentage", Percentage.Type}})
in
    #"Changed Type"

Capture.PNG

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.
jdbuchanan71
Super User
Super User

Hello @Anonymous 

It's because the data type for those columns is text so PowerQuery doesn't know you can round it.  If you change it to decimal number you will be able to round it.

rounding.jpg

Anonymous
Not applicable

Thanks for reaching out.

 

I made the change, and it worked. However, I'm trying to round off so that I don't see any digits after the decimal.

 

For example, I would like 4% instead of 4.00%. But each time I round I can't get rid of the 0's

 

I would just make that change in the model layer in PowerBI using formatting rather than in PowerQuery.

formatpct.jpg

 

Anonymous
Not applicable

Hi JD,

 

I tried your suggestion, but unfortunately, the format is Greyed out 'not available'

 

Can you think of any reason why that is?

 

 

Unfortunately, for some reason I'm unable to show you a photo / screenshot - the uploading of photos here in Desktop Forum is not available.

Hi @Anonymous 

You do still need to change the datatype in PowerQuery to decimal number.  Then when it is in the model you do the formatting to remove the extra digits on the %.  What does the Date Type show in PowerBI desktop?

formatpct2.jpg

Anonymous
Not applicable

jd,

 

I will check out your suggestion, and let you know how I get on.

 

Thanks

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.