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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Suman152
New Member

Filter the rows in a table when the filter value is present in any of two columns

This seems like it should be fairly simple but I am struggling to figure out how to do this with power bi as I'm new to Power BI.

I essentially have the following table structure.

 

Table:

Country 1Country 2CLMTNL
USAUSA1A
USACanada2B
CanadaUSA3

 

C

CanadaCanada4D
EuropeEurope5E
IndiaIndia6F
SingaporeSingapore7G

 

I want to create and apply below dropdown filter, which will need to have all unique values from Country1 & Country2 columns 

Page level Filter:

Country
USA
Canada
Europe
India
Singapore

 

Once we have that unique Country names, if we select USA from filter it will check for the USA value in both Country1 & Country2 columns and need to get the rows like below

 

If Filter = USA selected then result will be below, if USA is not present in Country1 row and USA present in Country2 still it will needs to fetch.

Country 1Country 2CLMTNL
USAUSA1A
USACanada2B
CanadaUSA3C

 

If Filter = USA & Canada two selected then result will be below, if Canada is not present in Country1 row and Canada present in Country2 still it will needs to fetch.

Country 1Country 2CLMTNL
USAUSA1A
USACanada2B
CanadaUSA3C
CanadaCanada4D

 

Basically the country filter needs to check values in Country1 & Country2 column if the value is present in any of the column then that respective row needs to be featched, I want this functanility to be worked for multi select. 

 

Please help me in figuring out the Solution.

 

Thanks you whoevery make time to read my query 🙂

1 REPLY 1
amitchandak
Super User
Super User

@Suman152 , Create an independent Country Table with, do not join back

 

Then have measure like

 

countrows(filter(Table, Table[Country 1] in values(Country[Country])  || Table[Country 2] in values(Country[Country])  ))

 

Need of an Independent Table in Power BI - Exclude: https://youtu.be/lOEW-YUrAbE

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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