Forum Discussion

min-E's avatar
min-E
Helper I
2 years ago
Solved

Filter/Distinct Count Help - Remove all records with same ID when one is filtered out.

Hello Community,  Desperately need some help. Found similar requests and tested but have not reached a resolution.   I have the data below with 3 distinct IDs. If I filter out records with Kiwi u...
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi, min-E 

    Create a new table to get an item1 that has nothing to do with the table to use as a slicer:

    Table 2 = SELECTCOLUMNS('Table','Table'[Item1])

     

     

    Create a new measure to exclude the id value of the item selected by the slicer:

    Measure = 
     VAR _ID = CALCULATE(MAX('Table'[ID]),FILTER(ALLSELECTED('Table'),'Table'[Item1]=SELECTEDVALUE('Table 2'[Item1])))
     RETURN
     IF(SELECTEDVALUE('Table'[ID])<>_ID,1)

     

    Put Item1 from Table 2 into the slicer, and then put the measure into the table visual, here is my preview:

     

    How to Get Your Question Answered Quickly 

    Best Regards

    Yongkang Hua

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