Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

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!!!

  • Hi Anonymous ,

     

    You can add a filter in your formula :

     

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

     

    Best Regards,

    Dedmon Dai

6 Replies

    • Anonymous's avatar
      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.

      • Greg_Deckler's avatar
        Greg_Deckler
        Icon for Community Champion rankCommunity Champion

        Anonymous Do you have a relationship between your two tables?

         

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