Forum Discussion

ahhollan's avatar
ahhollan
Icon for Helper I rankHelper I
6 years ago
Solved

Need to filter table based on column in another table.

i have table Reservations and table Rooms.  Reservations has a column called # Attending. Rooms has a column called Capacity. I want to filter out all rows in Reservations table where #Attending and Capacity are equal.  How do i do that?

  • ahhollan ,

     

    Suppose the two tables have many-many relationship like below:

     

    'Reservations'

     

     

    'Rooms'

     

     

    You can click Modeling-> New Table and input dax code below to achieve the filtered table:

    Filtered Table = FILTER(Reservations, Reservations[# Attending] in VALUES(Rooms[Capacity]))

     

     

    Community Support Team _ Jimmy Tao

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

     

     

1 Reply

  • v-yuta-msft's avatar
    v-yuta-msft
    Icon for Community Support rankCommunity Support

    ahhollan ,

     

    Suppose the two tables have many-many relationship like below:

     

    'Reservations'

     

     

    'Rooms'

     

     

    You can click Modeling-> New Table and input dax code below to achieve the filtered table:

    Filtered Table = FILTER(Reservations, Reservations[# Attending] in VALUES(Rooms[Capacity]))

     

     

    Community Support Team _ Jimmy Tao

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