Forum Discussion

TReynolds's avatar
TReynolds
Icon for Helper I rankHelper I
5 years ago
Solved

Filtering a table based on selections from multiple slicers using the same information

Hi forum,   I have a dataset that has a list of projects and their outputs. Each project has different a output depending on the scenario in place.   Table 1: Dataset Project Ouput Scenario...
  • v-alq-msft's avatar
    5 years ago

    Hi, TReynolds 

     

    Based on your description, I created data to reproduce your scenario. The pbix file is attached in the end.

     Table:

     

    Calculated table:

    S1 = 
    FILTER(
        'Table',
        [Scenario]=1
    )
    
    S2 = 
    FILTER(
        'Table',
        [Scenario]=2
    )
    
    S3 = 
    FILTER(
        'Table',
        [Scenario]=3
    )

     

    You may create a measure as below.

    Visual Control = 
    IF(
        (SELECTEDVALUE('Table'[Project]) in DISTINCT(S1[Project])&& SELECTEDVALUE('Table'[Scenario]) in DISTINCT(S1[Scenario]))||
        (SELECTEDVALUE('Table'[Project]) in DISTINCT(S2[Project])&& SELECTEDVALUE('Table'[Scenario]) in DISTINCT(S2[Scenario]))||
        (SELECTEDVALUE('Table'[Project]) in DISTINCT(S3[Project])&& SELECTEDVALUE('Table'[Scenario]) in DISTINCT(S3[Scenario])),
        1,0
    )

     

    Finally you need to put the meausre in the visual level filter to get the result.

     

    Best Regards

    Allan

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.