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.
Hello dear Power BI Community
I have the following problem to solve - let's assume this situation:
Participants in a questionnaire give various answers to diffrent questions.
They can answer these with good, bad or not at all.
To make this more clear and explain it in more detail:
For example, participant P1 answered question A with "good", question B with "bad" and gave no answer to C.
In addition, a reason why is required when rating a question as "bad" (see. lorem ipsum)
Note: An answered question as bad can have several reasons why (see P2 question C)
Participant-ID | Question | Question answered? | Good | Bad | Reason why if bad |
P1 | A | X | X | ||
P1 | B | X | X | lorem ipsum_1 | |
P1 | C | ||||
P2 | A | X | X | ||
P2 | B | X | X | ||
P2 | C | X | X | lorem ipsum_2 | |
P2 | C | X | X | lorem ipsum_3 | |
P3 | A | ||||
P3 | B | X | X | ||
P3 | C | X | X |
The goal is to create a grouped table like this below:
A cross table showing the number of answered questions (good or bad) in relation to the number of participants.
To make it more clear for example:
2 participant (P1 & P3) answered 2 questions
1 participant (P2) answered 3 questions -> Here is the main challenge: The result should be 3 and not 4 (because the participant answered question C twice in this data structure, but in fact it is only because of the two reasons why).
Num_of_Participant | Question answered |
2 | 2 |
1 | 3 |
Any ideas how to solve this problem?
Thank you very much for your contribution.
Cheers
qwertzuiop
Solved! Go to Solution.
Please see attached pbix.
Solution involves creating one Calculated Column.
Then creating your Table (or other) visual.
Hope this works for your larger dataset. Let me know if you have any questions.
Regards,
This measure may do the trick but depends on your actual data...
Questions Answered =
CALCULATE(
DISTINCTCOUNTNOBLANK(Questions[Question]),
Questions[Question answered?] = "X"
)
Have I solved your problem? Please click Accept as Solution so I don't keep coming back to this post, oh yeah, others may find it useful also ;). |
If you found this post helpful, please give Kudos. It gives me a sense of instant gratification and, if you give me Kudos enough times, magical unicorns will appear on your screen. If you find my signature vaguely amusing, please give Kudos. | Proud to be a Super User! |
Please see attached pbix.
Solution involves creating one Calculated Column.
Then creating your Table (or other) visual.
Hope this works for your larger dataset. Let me know if you have any questions.
Regards,
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
97 | |
95 | |
80 | |
77 | |
66 |
User | Count |
---|---|
130 | |
106 | |
105 | |
86 | |
72 |