The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hi,
I've 2 tables as below. I want to filter the first table based on the data available in table 2.
Dept | Item | Planned Cost | Actual Cost |
A | MAC | 7000 | 8500 |
A | monitor | 200 | 100 |
A | keyboard | 200 | 100 |
A | mouse | 200 | 100 |
B | chairs | 5000 | 6000 |
B | MAC | 3500 | 2500 |
B | TV | 1000 | 750 |
B | keyboard | 150 | 100 |
C | Coffee | 75 | 55 |
C | Chairs | 650 | 450 |
C | monitor | 800 | 700 |
C | desk | 1000 | 650 |
D | chairs | 800 | 900 |
D | MAC | 10000 | 7500 |
D | Mouse | 700 | 300 |
DEPT | ITEM |
A | MAC |
A | KEYBOARD |
B | CHAIRS |
B | mac |
C | monitor |
D | mouse |
D | chairs |
Expecting :
A | MAC | 7000 | 8500 |
A | keyboard | 200 | 100 |
B | chairs | 5000 | 6000 |
B | MAC | 3500 | 2500 |
C | Coffee | 75 | 55 |
C | monitor | 800 | 700 |
D | chairs | 800 | 900 |
D | MAC | 10000 | 7500 |
D | Mouse | 700 | 300 |
@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.
@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
________________________
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 🙂
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
Thank you!
User | Count |
---|---|
28 | |
10 | |
8 | |
6 | |
5 |
User | Count |
---|---|
33 | |
13 | |
12 | |
9 | |
7 |