Forum Discussion

LogiFons's avatar
LogiFons
Frequent Visitor
2 years ago
Solved

1 Filter for 2 values from 1 table

Good evening all,   I am working on a performance dashboard for my hauliers. This shows me the driven trips of a filtered haulier and the total score of his NCR's. Both should be visible in 1 she...
  • v-weiyan1-msft's avatar
    2 years ago

    Hi LogiFons ,

     

    Based on the sample and description you provided, Please try the following steps:

    1.You can create a calcualted table.

    Table 2 = DISTINCT('DataInput'[Haulier])

    There is no relationship between the two tables.

    2. Use the following code to create a Measure.

    Measure = 
    VAR _sel = ALLSELECTED('Table 2'[Haulier])
    RETURN
        IF(ISFILTERED('Table 2'[Haulier]),
            IF(
               MAX('DataInput'[NCR Responsible]) IN _sel,
               1
            ),
            1
        )
    

    3. Select your visual object, put the measure in the “Filters on this visual” section, and filter it by “Measure is 1”.

    The field of the slicer is from Table 2. When you select "HaulierRed" in the slicer, Result is as below.

     

    Best Regards,
    Yulia Yan

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