Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Filtering Between 2 Tables

Greetings datanauts!    Please see screenshot below.    Goal: I am trying to filter the All Customers table to remove any Customer ID's that are in the Contracts Sold table.  Problem: I am not...
  • ssugar's avatar
    7 years ago

    Using the sample data you provided, I was able to create a PATH of the company ids with contracts sold, and then create a calculated table that filters the all customers table to remove anything in the PATH of the company ids with contracts sold.

     

    DAX measure to create the path:

    Customer Id With Contract Sold = CONCATENATEX('Contracts Sold', 'Contracts Sold'[Customer Id], "|")

     

    DAX calculated table to create a table that only shows customers with no contract sold:

    Customers with No Contract Sold = FILTER('All Customers', PATHCONTAINS([Customer Id With Contract Sold], 'All Customers'[Customer Id]) = FALSE())

     

     

     

    PBIX file with this working: https://github.com/ssugar/PowerBICommunity/raw/master/community-sol-265075.pbix