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
AW1976NOVA
Post Patron
Post Patron

How change data type from Character to Percentage while specifying decimal

Hi,

 

I have a table I'm bringing in to Power BI.  One of the columns that is being brought in to Pwer BI is a decimal number...but in Character Format.  The issue is, when I convert these Characters to percentages....the new values do not make any sense and the decimal place is incorrect.  I'm trying to avoid adding a calculated column because the table is huge and I do not want to make the file any larger than it already is.  Here is an example of the data:

 

Name     Value

Andy      7.1

Bob        8.2

Dan        1.3

 

WhenI convert the value column from ABC to % in Edit Queries this is the result:

 

Name      Value

Andy       710%

Bob         820%

Dan        130%

 

I want the result to be:

 

Name       Value

Andy        7.1%

Bob          8.2%

Dan          1.3%

 

I need these values to be true percentages because I'm building out other metrics that are dependant on these values being actual percentages.

 

Is there a way to specify the decimal place in Edit Query without having to create a custom column?

 

 

 

 

Thank you

1 ACCEPTED SOLUTION
FrankAT
Community Champion
Community Champion

Hi @AW1976NOVA 

divide the values by 100 and format this value in percent.

With kind regards from the town where the legend of the 'Pied Piper of Hamelin' is at home
FrankAT (Proud to be a Datanaut)

View solution in original post

5 REPLIES 5
amitchandak
Super User
Super User

@AW1976NOVA , This already in %, so you can divide it by 100. Or you can keep it only as decimal

 

[Value]/100

Right.  I was hoping there was some kind of transformation already built n Power BI so I could avoid creating a new column with the expression [Value] / 100 but I don't think that is a capability.

@AW1976NOVA I am fairly certain that you can use the math operations to perform the math on the same column. Select column, choose divide from the math operations and enter 100. In Power Query Editor.


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...
FrankAT
Community Champion
Community Champion

Hi @AW1976NOVA 

divide the values by 100 and format this value in percent.

With kind regards from the town where the legend of the 'Pied Piper of Hamelin' is at home
FrankAT (Proud to be a Datanaut)

Greg_Deckler
Super User
Super User

@AW1976NOVA In Power Query, divide those values by 100 and then display them as percentages.


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Fabric Monthly Update - May 2024

Check out the May 2024 Fabric update to learn about new features.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.