Forum Discussion

PBI5851's avatar
PBI5851
Icon for Helper V rankHelper V
2 years ago
Solved

Apply filter but not exclude all

For the data below , the expectation is to display all the members and the number of contacts they had. But I have to use the contact date as a slicer.  PersonID Name ContactDate A123 Jim ...
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi PBI5851 ,

     

    According to your description, here are my steps you can follow as a solution.

    (1) My test data is the same as yours.

    (2) We can create measures. 

    CountofContact = IF(MAX('Table'[ContactDate]) <> BLANK(),1,0)
    Measure = IF(COUNTROWS(ALL('Table'[PersonID]))=COUNTROWS(VALUES('Table'[PersonID])),COUNTROWS(VALUES('Table'[PersonID])),SUMX(ALLSELECTED('Table'),[CountofContact]))

    (3) Then the result is as follows.

    Best Regards,

    Neeko Tang

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