Forum Discussion

PraveenGuntuka's avatar
PraveenGuntuka
Regular Visitor
3 years ago
Solved

filter using two columns

Hi,   We have a requirement to filter data based on two column values. contat Trade source Corporate Salesperson 123  $     100 SMS Y Y 242  $     200 E...
  • PraveenGuntuka's avatar
    3 years ago

    it would probably make sense to calculate a new table to handle this. The table will have two columns, Corporate and SalesPerson :

    Slicer Table =
    UNION (
    SELECTCOLUMNS (
    FILTER( 'Table' , 'Table'[Corporate] <> BLANK() ) ,
    "Source" , 'Table'[Source] ,
    "Selection" , 'Table'[Corporate]
    ),
    SELECTCOLUMNS (
    FILTER ( 'Table' , 'Table'[Salesperson] <> BLANK() ) ,
    "Source" , 'Table'[Source] ,
    "Selection" , 'Table'[SalesPerson]
    )
    )
    After this has been calculated, create a relationship between these tables, between the Source columns. Since this is purely for filtering the table on the person of interest, make it be Many-to-Many and have Slicer Table filter Table:


    Create a slicer with the Selection column from the Slicer Table and test the functionality: