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
ronniej7940
New Member

Power Query to change certain values to percentage

I have some columns that were percentages, but when I unpivoted them they turned into decimals.  Is there a way to turn them back into percentages without affecting the other values?  Thanks!

 

ronniej7940_0-1665359973839.png

 

3 REPLIES 3
ryan_mayu
Super User
Super User

@ronniej7940 

we can only set one data type for one column, but we have some workarounds to display the data. 

Measure = if(CONTAINSSTRING(max('Table (2)'[attribute]),"%"),sum('Table (2)'[result])*100&"%",sum('Table (2)'[result]))

1.PNG





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




that sort of worked, but the percentages still have a long string of numbers after the decimal.  it also only worked for the first set of percentages and not the rest

 

ronniej7940_0-1665368581108.png

 

@ronniej7940 

you can create a dim table or create a sort column in the existing table.

then sort by the sort column

Sort one column by another column in Power BI - Power BI | Microsoft Learn

1.PNG





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




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.