Forum Discussion
ronniej7940
3 years agoNew 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! ...
ryan_mayu
Super User
3 years agowe 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]))
ronniej7940
3 years agoNew Member
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
- ryan_mayu3 years ago
Super User
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