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

Filter a table based on 2 columns from another table

Hi,

 

I've 2 tables as below. I want to filter the first table based on the data available in table 2. 

 

DeptItemPlanned CostActual Cost
AMAC70008500
Amonitor200100
Akeyboard200100
Amouse200100
Bchairs50006000
BMAC35002500
BTV1000750
Bkeyboard150100
CCoffee7555
CChairs650450
Cmonitor800700
Cdesk1000650
Dchairs800900
DMAC100007500
DMouse700300

 

DEPTITEM
AMAC
AKEYBOARD
BCHAIRS
Bmac
Cmonitor
Dmouse
Dchairs

 

Expecting : 

 

AMAC70008500
Akeyboard200100
Bchairs50006000
BMAC35002500
CCoffee7555
Cmonitor800700
Dchairs800900
DMAC100007500
DMouse700300
3 REPLIES 3
Greg_Deckler
Community Champion
Community Champion

@disturbedspace - You might want to build a composite key column in both tables like this:

 

Key = [Dept] & ":" & [Item]

 

Then you can relate your tables. I would recommend changing all of your values to all lower or all uppercase in Power Query as well.



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...
Fowmy
Super User
Super User

@disturbedspace 

You can do a power query merge to get the result you need.
You can check the attached file.

Check your results table, there are some descripancies 

 

https://1drv.ms/u/s!AmoScH5srsIYgYJ2BqN0AvffHQqXuw?e=1nIlc9

Fowmy_0-1596390880271.png

 




________________________

Did I answer your question? Mark this post as a solution, this will help others!.

Click on the Thumbs-Up icon on the right if you like this reply 🙂

YouTube, LinkedIn


Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Thank you!

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.