Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Be 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

Reply

Assign a value to text

Hi all,

 

I am running a skill matrix on my team and in few questions we are asking them to give themself a score on few categories. For instance in Excecel they can select between 5 options: Novice, Understand basics, Capable, Advance, Expert.

 

Now these words will appear on many columns at a row level. I wouldn't like to create a custom column cause it would take me a lot of time cause i would need to create as many custom columns as many questions I have. What i would like to do is set up some rules and assign a numeric value to each option such as: Novice = 1; Understand basics = 2; and so on.

 

Does anyone knows how i can achieve this?

 

Thanks in advance,

1 ACCEPTED SOLUTION
Vijay_A_Verma
Super User
Super User

Since, there are many columns which you need to make this replacement and you don't want to create new columns, I would suggest you should do this in Power Query which will do the replacement within the columns themselves

Select all columns which are for questions

Transform - Replace values - Replace Novice with 1. Do the same for other words as well with their respective values as well.

View solution in original post

3 REPLIES 3
randyvdr
Frequent Visitor

Hello @amitchandak,

 

How can I do the same with a measurement instead of  creating a new column, when Swicth is asking me for an expresion over this text column

 

Regards 

Vijay_A_Verma
Super User
Super User

Since, there are many columns which you need to make this replacement and you don't want to create new columns, I would suggest you should do this in Power Query which will do the replacement within the columns themselves

Select all columns which are for questions

Transform - Replace values - Replace Novice with 1. Do the same for other words as well with their respective values as well.

amitchandak
Super User
Super User

@Alessandro-laba , Based on what I got

A new column

Switch( Table[Column],

"Novice" , 1,

"Understand basics", 2,

// Add other values

)

 

If there are circular dependencies then create a new column

column1 =[Column]

 

Then the set other column as the sort column

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.