Forum Discussion

Ianc33's avatar
Ianc33
Frequent Visitor
6 years ago
Solved

Remove rows matching slicer output

Hi Everyone,   I have a table which is similar to the below.   NAME, TAG name1,tag1 name1,tag2 name2,tag1 name2,tag2 name3,tag1 name3,tag2 name4,tag1   Which is in a table visual.   If...
  • v-kelly-msft's avatar
    6 years ago

    Hi Ianc33

     

    Duplicate the table;

    Then create a measure as below:

    Measure = 
    var _namesexclude=CALCULATETABLE(VALUES('Table 2'[NAME]),FILTER(ALL('Table 2'),'Table 2'[TAG]=SELECTEDVALUE('Table'[TAG])))
    var _nameremain=EXCEPT(DISTINCT('Table 2'[NAME]),_namesexclude)
    Return
    IF(ISFILTERED('Table'[TAG])=FALSE(),MAX('Table 2'[NAME]),IF(MAX('Table 2'[NAME]) in _nameremain,MAX('Table 2'[NAME]),BLANK()))

    And you will see:

    For the related .pbix file,pls see attached.

     

     
    Best Regards,
    Kelly
    Did I answer your question? Mark my post as a solution!