Forum Discussion
Mathematically transform values in a column in Power Query
I am (re)building a dataset and report from an Excel sheet that I download. There are columns that are supposed to be rates, i.e. number of new visits coded X/total number of new visits. Unfortunately, these are all formated as numbers rather than percentages. So, for example, where a code utilization rate is listed as 19.04, it should really be 19.04%, or 0.1904. See image:
Is there a way I can transform these values to be correct, either within Power Query or through DAX? I don't want to do it in the source file because that will take some work and I am trying to set this up so that I can just add future files into the source folder to update it.
Note that I can't just make them data type: percentage because, using my previous example, 19.04 will become 1904% rather than 19.04%. This matters for some other calculations, conditional formating, and displaying the values correctly as percentages.
Hi,
The picture should say it all
4 Replies
- Ashish_MathurSuper User
Hi,
The picture should say it all
- cathomsResponsive Resident
Perfect, thatnks!
- Ashish_MathurSuper User
You are welcome.
- parry2kSuper User
cathoms maybe add another column and divide the value by 100 and then remove old columns:
New Column = [Column]/100you have to add new column for each column that need transformation.
✨ Follow us on LinkedIn
Check my latest blog post The Power of Using Calculation Groups with Inactive Relationships (Part 1) (perytus.com) I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!
⚡ Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.⚡