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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Jason6
Helper I
Helper I

Filter second table based on selected value in first table . No relationship exists between two tabl

Thank you in advance for your inputs

I have two tables in my powerbi model , first which is the raw table and the second table which has items listed

"Item"column from Table 1 is the slicer value which user chooses 

I want the second table to be displayed only for those values which correspond to selected value

 

Problem in below model is we cannot have a relationship as second table has categories concatenated ( it could be 10-15 values in actual model)

 

Is there any way for this result to be achieved 

For example if user chooses "Category 3" as slicer, i want the second table to be filtered and show "Item3" & "Item2" as both of these have "Category3" in them

 

Sample Table.PNG

 

I tried to create a calculated column based on selected value measure but it does not work and the calculated column is always blank

 

1 ACCEPTED SOLUTION
v-eachen-msft
Community Support
Community Support

Hi @Jason6 ,

 

You could edit your second table in query editor. Here is my sample data.

2-1.PNG

1. Split "Column1" by delimiter. 

2-2.PNG

2. Unpivot your category columns and remove extra columns. Now you could create relationships between two tables.

2-3.PNG

Then you could use SELECTEDVALUE() function to get a result as a flag in filter pane.

Here is my test file four your reference.

 

Community Support Team _ Eads
If this post helps, then please consider Accept it as the solution to help the other members find it.

View solution in original post

8 REPLIES 8
v-eachen-msft
Community Support
Community Support

Hi @Jason6 ,

 

You could edit your second table in query editor. Here is my sample data.

2-1.PNG

1. Split "Column1" by delimiter. 

2-2.PNG

2. Unpivot your category columns and remove extra columns. Now you could create relationships between two tables.

2-3.PNG

Then you could use SELECTEDVALUE() function to get a result as a flag in filter pane.

Here is my test file four your reference.

 

Community Support Team _ Eads
If this post helps, then please consider Accept it as the solution to help the other members find it.

Thank you everyone for your inputs . Greatly appreciate your help

@v-eachen-msft I was able to achieve the result with your inputs, Thank you 🙂

amitchandak
Super User
Super User

@Jason6 ,  Option 1. Split the column in table 2.

https://www.tutorialgateway.org/how-to-split-columns-in-power-bi/

 

Keep them diconncted and use in fllter clasue : https://docs.microsoft.com/en-us/dax/containsstring-function-dax

 

 

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

@amitchandak I tried this and in my actual data i got 27 columns for one record, the value might keep increasing with future files , however even after i do that i would still need to filter based on selected value of table 1 filter

Pragati11
Super User
Super User

Hi @Jason6 ,

 

Is there any commom column in both of your tables with same format of values or is it just what you have shown in screenshot?

 

Thanks,

Pragati

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

@Pragati11  There is no common value, the behaviour is same as per screenshot

The common values are concatenated 

Greg_Deckler
Community Champion
Community Champion

@Jason6 - You should be able to create a selector to do this for you. https://community.powerbi.com/t5/Quick-Measures-Gallery/The-Complex-Selector/m-p/1116633#M534

 

Basically, you can grab the value in the slicer using SELECTEDVALUE or MAX/MIN, etc. You can then use that to determine if the row in your second table matches that value and if so return 1, otherwise 0. You can filter the visual on 1.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

@Greg_Deckler  In the file you shared, the Complex selector looks at a number and the measure is set accordingly based on single value 

However in my example i have category labels and i have to use Search or find functionality to search in the second table

How can i encorporate the search feature and then set a measure 

 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors