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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

Filter without removing other answers

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! 

1 ACCEPTED SOLUTION
d_gosbell
Super User
Super User

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:

https://www.daxpatterns.com/survey/

View solution in original post

1 REPLY 1
d_gosbell
Super User
Super User

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:

https://www.daxpatterns.com/survey/

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.