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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

Different amount of decimals is messing up the result

Hi everybody,

 

I have a raw data which contains a column of percentages. For example (in this format),

99,1%
97,10%
91,5% 

 

The issue is that when I load this into Power BI and look in the data tab the data is converted into:

9.91
97.10
9.15

 

In other words, if there is only one decimal then Power BI will make the number smaller. I am in Europe (,) but my standard of Power BI is in US (.) and the raw data is in commas (,). 

 

Any idea what I can do to fix this, apart from adding a second decimal to the raw data? (big file so don't know a smart way to do it in mass).

 

Thanks in advance! 

2 ACCEPTED SOLUTIONS
watkinnc
Super User
Super User

You could make the column type text, and the use Replace Values to replace "," with ".".

 

Then you can transform back to type number and then to percentages.

 

--Nate


I’m usually answering from my phone, which means the results are visualized only in my mind. You’ll need to use my answer to know that it works—but it will work!!

View solution in original post

v-stephen-msft
Community Support
Community Support

Hi @Anonymous ,

 

First you turn your field to text type.

10.png

 

Then right click on the field and select Using local.

11.png

 

Change type as follows, data type is percentage, and locale is german.

12.png

13.png

 

You can check more details from the attachment.

 

 

 

 

Best Regards,

Stephen Tao

 

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

9 REPLIES 9
v-stephen-msft
Community Support
Community Support

Hi @Anonymous ,

 

First you turn your field to text type.

10.png

 

Then right click on the field and select Using local.

11.png

 

Change type as follows, data type is percentage, and locale is german.

12.png

13.png

 

You can check more details from the attachment.

 

 

 

 

Best Regards,

Stephen Tao

 

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

Anonymous
Not applicable

Thank you, worked perfectly!

watkinnc
Super User
Super User

You could make the column type text, and the use Replace Values to replace "," with ".".

 

Then you can transform back to type number and then to percentages.

 

--Nate


I’m usually answering from my phone, which means the results are visualized only in my mind. You’ll need to use my answer to know that it works—but it will work!!
HotChilli
Super User
Super User

I think there's a mismatch in Power Query and PowerBi with the regional settings of your PC . The mismatch will be around decimal symbol and digit grouping symbol.  You might have to handle this yourself in Power Query.

It would be clearer if you can tell us what datatype the original has in Power Query.  Is there any type change in power query? And also what datatype the field has in powerbi?

---- 

If you have to handle this yourself (without changing regional settings etc) , 

you might try right-clicking the column in Power Query and pick 'Change Type ->using Locale' . That might take a little experimentation to get what you want.

Syndicate_Admin
Administrator
Administrator

@p4dd4 

 I believe your data look like this at the begining 

Fowmy_0-1629367511960.png

 

Change it to Demical Number

Fowmy_1-1629367540192.png


Choose Divide from Formatting under Transform Tab

 

Fowmy_2-1629367605840.png


Then change it to % Data Type

Fowmy_3-1629367636338.png

Result

Fowmy_4-1629367662417.png

 

 

 

 

Fowmy
Super User
Super User

@Anonymous 

 I believe your data look like this at the begining 

Fowmy_0-1629367511960.png

 

Change it to Demical Number

Fowmy_1-1629367540192.png


Choose Divide from Formatting under Transform Tab

 

Fowmy_2-1629367605840.png


Then change it to % Data Type

Fowmy_3-1629367636338.png

Result

Fowmy_4-1629367662417.png

 

 

 

 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Anonymous
Not applicable

Hi @Fowmy  thanks for your answer! I was perhaps a bit unclear. I want the result to be 99.1%, 97.1% and 91.5%. Is it something I have to fix in the raw data then? 

@Anonymous 

You need to do it in Power Query, If you can get done from the source it will be much better. 

To get the desired results, instead of dividing by 100, divide by 10

 

Fowmy_0-1629369159604.png

 



Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Anonymous
Not applicable

Hi again, but if I dive it by 10, won't the result then be  91.1%, 971.0%, and 91.5%?

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.

Top Solution Authors
Top Kudoed Authors