When I extracting a report from ServiceNow for instance, the percentage column shows as a number:
To remediate, there are 2 ways, changing it from excel directly or from Power BI. I will explain first from excel, although this topic is to explain you how to do it with Power BI but in case of.
First, format the column in %, then in another column, put this formula in the cell C2:
Duplicate it for the other cells and format this column in % without forgetting to show 2 decimals.
For Power BI, I have to go to the query editor first:
- 1. Home -> transform data -> transform data
- 2. Transform -> replace values
- 3. In the popup, I put anything I like, I don’t care because I just want to get the code then click on “OK”
- 4. Home -> advanced editor
- 5. Replace “123456,456789” by “each[argument],each[argument]/100” then click on “done”. NOTE: change "argument" by yours
- 6. Click on “close & apply”
If all go well, I get this view, so not yet the percentage I need:
To put it right:
- 1. Select the column
- 2. Column tools -> data type. Change “text” by “decimal number” and in format, select “percentage”
And here it is the result: