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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
GTheunissen
Regular Visitor

extract rows in table based on other table

I have two tables. One table exist the names of rows i want to execute in the second table. 

 

How can I do that? 

GTheunissen_0-1660988801658.png

This column names need to be executed in this table: 

GTheunissen_1-1660988840547.png

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @GTheunissen ,

 

So you want to filter the second table for usernames that are common to the first table?

 

If so, you can try this measure to filter:

Measure = IF(SELECTEDVALUE('Table 1'[username]) in VALUES('Table 2'[Column2]),SELECTEDVALUE('Table 2'[Column2]))

 

the result will as the image shows:

vmengzhumsft_0-1661237453448.png

If this way meets your needs, you also can view my testing pbix file.

 

Best regards,

Community Support Team Selina zhu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

Hi @GTheunissen ,

 

So you want to filter the second table for usernames that are common to the first table?

 

If so, you can try this measure to filter:

Measure = IF(SELECTEDVALUE('Table 1'[username]) in VALUES('Table 2'[Column2]),SELECTEDVALUE('Table 2'[Column2]))

 

the result will as the image shows:

vmengzhumsft_0-1661237453448.png

If this way meets your needs, you also can view my testing pbix file.

 

Best regards,

Community Support Team Selina zhu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

tamerj1
Super User
Super User

Hi @GTheunissen 

There must be a column that links table1 with table2

Jeanxyz
Impactful Individual
Impactful Individual

yes, table 1 merges with tab2 based on column company name.

Jeanxyz
Impactful Individual
Impactful Individual

If you want to filter table 1 based on the companies that exist in table 2, you can merge tables in Power Query. 

step 1. Merge table1 and 2 based on company name

merge snapshot 1.PNG

step2. expand company name column from table 2

merg2.png

 

step 3. export the merged table3

There are different ways to export the data, here I simply copy the whole table3 and paste it to Excel. You can filter out the null values in tab2: Company Name before copy data. 

merg3.png

Samarth_18
Community Champion
Community Champion

Hi @GTheunissen ,

 

Your question is not much clear.  Could you please explain with examples and also share your sample data in text format not a screenshot.

 

Note:- One suggestion kindly promote your first row as a header in table 2 as shown below:-

Samarth_18_0-1660991828143.png

 

 

BR,

Samarth

Best Regards,
Samarth

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors