Forum Discussion

sonm10's avatar
sonm10
Icon for Helper I rankHelper I
4 years ago
Solved

Slicer to filter two column without context

Hello, I have a sample dataset as follows: Product Category Type Seller Buyer Cost Product1 Cat1 Type1 A C 10 Product2 Cat2 Type1 C A 20 Product3 Cat2 Type2 C B 30 ...
  • Fowmy's avatar
    4 years ago

    sonm10 

    I created a new table combining Seller and Buyer with distinct values then created a measure that identifies if the selected values (One or more) is found then filters the table. Check the attached file

     



    Exists = 
    VAR __SellerBuyerSelected = VALUES( BuyerSeller[Buyer] )
    RETURN
        CALCULATE(
            COUNTROWS(table1),
            Table1[Buyer] IN __SellerBuyerSelected || Table1[Seller] IN __SellerBuyerSelected
        )



     

  • sonm10's avatar
    sonm10
    4 years ago

    Fowmy, Thanks for your solution. It is working as expected however, when we only have the buyer, seller and cost columns in the table, the silcer is not working. For that, I have added an additional field (although not required in that particular table) for the slicer to work.