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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
Anonymous
Not applicable

How to compare two tables to filter data

Hi,

I have one table with 3 years of monthly sales that includes products numbers and an additional table with about 500 products numbers I want to pull sales totals for.  How do I get it to filter on that table? I've added it as to 'Filters on this page only', all of the products numbers are selected, but my visual is still showing all records in the original file.  I'm sure it's a simple thing to do, but being so new to Power bi, I was hoping someone could walk me through it.

 

Thanks!!!

1 ACCEPTED SOLUTION

Hi @Anonymous ,

 

You can add a filter in your formula :

 

'Table'[List Number]  IN VALUES('Table2'[Nums Q4])

 

Best Regards,

Dedmon Dai

View solution in original post

6 REPLIES 6
amitchandak
Super User
Super User

@Anonymous , is the product table(assumed have a unique product and used in slicer) is joined properly. If join is missing or inactive it can happen

 

If the interaction has been turned off this can happen

https://docs.microsoft.com/en-us/power-bi/service-reports-visual-interactions

 

If all has been used in table formula it can happen

calculate([measure],all(Table))

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
parry2k
Super User
Super User

@Anonymous share sample data and what you are trying to achieve, also share the screenshots. Read this post to get your answer quickly.

https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Anonymous
Not applicable

The link you provided is no longer valid.  I only want the visual to show the product numbers that are the on Q4 Prod nums list that are included the 2017 file in the List Number field. 2017 would be my main file and Q4 Prod nums my secondary file.  In essence a vlookup to determine the sales for certain product numbers during a partical year. Screenshots are attached.

1.JPG2.JPG

@Anonymous Do you have a relationship between your two tables?

 

If not, you can also accomplish this using the IN operator.



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...
Anonymous
Not applicable

Hi Greg!

 

I don't have a relationship set up between the two tables.  How would I do that?

 

Thanks for helping the newbie!

 

_stephanie 

Hi @Anonymous ,

 

You can add a filter in your formula :

 

'Table'[List Number]  IN VALUES('Table2'[Nums Q4])

 

Best Regards,

Dedmon Dai

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.