Forum Discussion

jonbox's avatar
jonbox
Icon for Helper II rankHelper II
3 years ago
Solved

Compare rows and delete based on condition

Hi All, hopefully a simple request;   I have data similar to Table1 where the people in the "Name" column are in different "rooms". What i want is to get to the Table2 where if they're in room 5 sp...
  • v-zhangti's avatar
    3 years ago

    Hi, jonbox 

     

    You can try the following methods.

    Column:

    Check Room 5 = 
    Var _table=CALCULATETABLE(VALUES(Table1[Room]),FILTER(ALL(Table1),[Name]=EARLIER(Table1[Name])))
    Var _N1=IF("Room 5" in _table,"Room 5",[Room])
    Return
    IF([Room]=_N1,[Room],BLANK())

    New Table:

    Table2 = FILTER(Table1,[Check Room 5]<>BLANK())

    Is this the result you expect?

     

    Best Regards,

    Community Support Team _Charlotte

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