Forum Discussion

pbhat89's avatar
pbhat89
Icon for Helper II rankHelper II
5 years ago
Solved

Cross filtering across tables

My one table is given in the format below  ID Age Height Score 1   20     167     120 2   30     150     122 3   40     190      100   Table 2 is  ID Condition 1    A 1    A 2    B 3    C ...
  • v-zhenbw-msft's avatar
    v-zhenbw-msft
    5 years ago

    Hi pbhat89 ,

     

    Do you want the result is the measure or the table?

    If the measure is your result, please refer the following steps.

     

    1. Change the Both direction to Single.

     

     

    2. Then create a measure like this,

     

    Measure = 
    var _selected = SELECTEDVALUE('Table 2'[Condition])
    var _select_count = CALCULATE(COUNT('Table 1'[ID]),FILTER('Table 2','Table 2'[Condition]=_selected))
    var _Total = COUNT('Table 1'[ID])
    return
    _Total - _select_count
    

     

     

     

    If you have any question, please kindly ask here and we will try to resolve it.

     

    Best regards,

     

    Community Support Team _ zhenbw

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

     

    BTW, pbix as attached.