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
Vaiden
New Member

Find what values exist in Col1 where in multiple rows, each row with different condition met in Col2

Hey Everyone,

 

I am trying to do something extreamly specific and not sure if its even possible within Power BI. I have a table with users and intrest, looks similar to the image below.

 

Vaiden_0-1687366360137.png

 

By default with PowerBI if I use a slicer to find where intrest is sports and hiking it would return back any row were the intrest field had either sports or hiking as the value as shown below.

 

Vaiden_1-1687366441440.png

 

What I am trying to do is find what users have intrest in both sports AND hiking, and I am strugleing to find a way to do this. I assume I need to compair each row to itself to find where the user exist mutliple times and has both intrest insted of just one of the two specified. With the example table this would be the results I want to see:

 

Vaiden_2-1687366924008.png

 

Is there a way to filter the table like this? Thank you for your time!

2 REPLIES 2
mahenkj2
Solution Sage
Solution Sage

Hi @Vaiden 

 

You can make it fully dynamic here:

 

mahenkj2_0-1687371544302.png

 

 

https://drive.google.com/file/d/1cWuBxA49pqco_I8zrhCFeXDHV0fVuRuM/view?usp=sharing

 

Hope it helps.

mahenkj2
Solution Sage
Solution Sage

Hi @Vaiden 

 

Its possible by few ways at least.

 

One ways, is kind of grouping by Users, and if count is more than once in the table, then we can filter those. 

 

for example, 

Counts = CALCULATE(COUNTROWS('Table'),ALL('Table'[Interest]))

 

and in the visual level filter, apply filter for these counts >1.

 

mahenkj2_0-1687369585758.png

 

Hope it helps.

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

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

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.