Forum Discussion
Anonymize money
Hi,
I have made a big report based on a company to check all numbers, now after this we want to be able to present this report anonymously without the numbers and names of the other company.
I have anonymized all things like names and such, but I also want to make a random calculation in a column that I use as a base for a ton of measures.
This column contains transaction amounts, I just want to make something random like +3*0.52+300/238*2.12 for all values inside this column without creating a new one. Is it possible? Otherwise I have to adjust a ton of measures.
Thanks!
Anonymous I can try to explain here, let's say your existing column is called Amount
- click transform data
- add custom column and call it New Amount
- add following expression for custom column, in your formula replace value with Amount column name. For example, in following expression I replace 3 with Amount.
=[Amount]*0.52+300/238*2.12- after new custom column is added, remove Amount column
- rename New Amount column to Amount
close and apply and it will load new data to the model.
PS - Make backup of your pbix before making these changes.
I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos 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.⚡
4 Replies
- parry2k
Super User
Anonymous you can do this random calculation in power query so that you don't have to add a new column and all these measures will work.
I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos 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.⚡
- AnonymousNot applicable
Thanks parry2k , I thought so.
Do you maybe have an example of this? I am always at a loss in power query, have no clue where to start and how to do it.
- parry2k
Super User
Anonymous I can try to explain here, let's say your existing column is called Amount
- click transform data
- add custom column and call it New Amount
- add following expression for custom column, in your formula replace value with Amount column name. For example, in following expression I replace 3 with Amount.
=[Amount]*0.52+300/238*2.12- after new custom column is added, remove Amount column
- rename New Amount column to Amount
close and apply and it will load new data to the model.
PS - Make backup of your pbix before making these changes.
I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos 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.⚡