Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi all,
I am using Power BI for survey data. I have a data tabel with a username and six questions which all have the answer "negative", "positive" or empty. I want to see all "negative" answers for all of the users. However, I cannot filter on "negative" because a user may have responded empty to question1 but "negative" to question 2. I want to see that second negative but if I filter only "negative" on question 1 it will remove the "negative" in question 2.
I have tried to make a seperate answers table so that I can filter on only negative but you can't have multiple relationships.
So my question is, is it possible to filter without removing other answers OR is it possible to have multiple relationships to filter by a seperate field?
I hope I've made my question clear. Thanks!
Solved! Go to Solution.
So when you say " I have a data tabel with a username and six questions" do you mean you have a column per question?
If so you could do something like the following:
Negatives = COUNTROWS( FILTER( Survey, Survey[Q1] = "negative" || Survey[Q2] = "negative" || Survey[Q3] = "negative" || Survey[Q4] = "negative" || Survey[Q5] = "negative" || Survey[Q6] = "negative" ) )
But you might also want to look at structuring your data differently see:
So when you say " I have a data tabel with a username and six questions" do you mean you have a column per question?
If so you could do something like the following:
Negatives = COUNTROWS( FILTER( Survey, Survey[Q1] = "negative" || Survey[Q2] = "negative" || Survey[Q3] = "negative" || Survey[Q4] = "negative" || Survey[Q5] = "negative" || Survey[Q6] = "negative" ) )
But you might also want to look at structuring your data differently see:
User | Count |
---|---|
101 | |
90 | |
83 | |
72 | |
66 |
User | Count |
---|---|
113 | |
104 | |
101 | |
73 | |
65 |