March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
hello
I am trying to solve a tricky problem
I have a survey with answers like "happy", "unhappy", etc. I need to assign a numeric value for rating - "happy = 1"
I know a can do conditional column. But there is a lot of words, and the numeric values might change.
What I want to do is create a separate table with words in one column, assigned value in another, and then in the main table create a new column based on the rule set in this small separate table...
HOW?
thank you
Solved! Go to Solution.
Hi @Ondrej ,
You can create a separate table with words in one column and assigned value in another column. Then, you can use the Merge Queries feature to join the two tables based on the word column. After that, you can use the Replace Values feature to replace the words in the main table with their corresponding numeric values.
Merge queries overview - Power Query | Microsoft Learn
Replace values and errors - Power Query | Microsoft Learn
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
it turns out the solution is pretty simple
you just do not want to do it in power query editor, but using simple DAX expression, you can add a column in power bi data view tab
it turns out the solution is pretty simple
you just do not want to do it in power query editor, but using simple DAX expression, you can add a column in power bi data view tab
Hi @Ondrej ,
You can create a separate table with words in one column and assigned value in another column. Then, you can use the Merge Queries feature to join the two tables based on the word column. After that, you can use the Replace Values feature to replace the words in the main table with their corresponding numeric values.
Merge queries overview - Power Query | Microsoft Learn
Replace values and errors - Power Query | Microsoft Learn
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
21 | |
16 | |
13 | |
12 | |
9 |
User | Count |
---|---|
34 | |
31 | |
20 | |
19 | |
17 |