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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
DGID
Frequent Visitor

Changing text column into specific numbers.

Hello 

 

I am trying to make a key from 2 columns of responses. The results are either Happy, Neutral, or Unhappy and there are only two columns with those responses. I want to make a new column that has the total "score" where:

Happy = 1

Neutral = 0

Unhappy = -1 

 

I've tried sumx with switch nested inside to try and get this to work but have not had any luck.

 

To clarify in the data the columns are the 1st and 2nd Interview Outcome in the HRSYST1 table.

 

PBIX File

 

Copy of Data

 

Thank you in advance

1 ACCEPTED SOLUTION
DGID
Frequent Visitor

I ended up creating 6 columns for each value i.e. one for the 1st  outcome happy, one for the 2nd outcome happy etc and then adding those together to get my total column.

 

I feel like there has to be a more efficient way but that was all I could come up with.

 

Thank anyone for any insight.

View solution in original post

1 REPLY 1
DGID
Frequent Visitor

I ended up creating 6 columns for each value i.e. one for the 1st  outcome happy, one for the 2nd outcome happy etc and then adding those together to get my total column.

 

I feel like there has to be a more efficient way but that was all I could come up with.

 

Thank anyone for any insight.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors