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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Bauhaus-Arti
Frequent Visitor

Scoring survey answers

Hi Power BI community,

After doing some research i have not been able to solve my problem so i hope you guys can help me out. I have two tables:

survey awswers:

NameQuestion 1 Question 2 Question 3
Johnyesnono
Janenoyesno

 

Scoring table:

Questionscore_scenario_1_yesscore_scenario_1_noscore_scenario_2_yesscore_scenario_2_no
14026
23120
32381

 

The goal that im trying to achieve is a caluated column that creates a total score per scenario based on the scoring table. The result would look like this:

NameQuestion 1Question 2Question 3score_scenario_1score_scenario_2
Johnyesnono8 (4+1+3)5 (2 + 0 + 3)
Janenoyesno6 (0+3+3)9 (6 + 2 + 1)

 

By this point i have no idea how i can accomplish this sinds there is no relationship between the two tables... I hope any of you are able to help me out. Let me know if you need some extra information.

 

Thank you for your help.

5 REPLIES 5
Nathaniel_C
Super User
Super User

Hi @Bauhaus-Arti ,
If John answered q3 as how is his score for Scenario 2 = 5 (2 + 0 + 3)? Trying to understand.
Let me know if you have any questions.

If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos 👍are nice too.
Nathaniel





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Hi @Nathaniel_C ,

I made a mistake with choosing the right score, for Jhon it shoud be 2+0+1 = 3. To specify the calculation, there are two scenario's, let's take scenario 1 for exaple.  When a respons is submited with the answers Q1 = yes, Q2 = no and Q3 = yes, the calulation has to lookup the values 4, 1 and 2 in the scoring table and add these in the score_scenario_1 column. The same has to be done for scenario 2 so that for the last step the highest scenario can be chosen.

 

Hope this clears things up 🙂

 

 

@Bauhaus-Arti solution is attached to give you an idea how it will work, you can enhance/tweak it from here.

 

 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Hi @parry2k ,

 

Thank you for your respons! 

I can see you have splitted the answers across the rows. Unfortunately im not able to mutate the table that much. We get there answers with microsoft forms and when we export these, the questions will be the column names, just as the survey awswers table. Sinds we have to do this about 50 times a year i am looking for a way that costs minimal effort and can possibly be automated. I had these three steps in mind:

  1. load the survey awswers 
  2. load the scoringstable
  3. add the calculated column 

The idea of the scoringstable is that we have one place where we can edit the scoring if we need to change them. Do you think you can make this work? 

 

thank you so much for the effort 🙂

@Bauhaus-Arti unpivot survey answers is done by power query so your raw data will be used as it is, you don't need to do it manually, check query steps in query editor.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.