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. 

PersonIDNameContactDate
A123Jim1/1/2023
A234Steve1/2/2023
A345Mike2/5/2023
A346Jenna4/5/2023
A347Mary6/4/2023
A348Phil1/6/2023
A349Mark 
A350Bono 
A351Bill4/1/2023
A352Scott 
A353Dave 

 

So when i display the date , i get only the persons with the contact date. I tried using all except but the display of slicer removed the 4 other individuals without contact.

 

The expectation is 

PersonIDNameCountofContact
A123Jim1
A234Steve1
A345Mike1
A346Jenna1
A347Mary1
A348Phil1
A349Mark0
A350Bono0
A351Bill1
A352Scott0
A353Dave0


Any solution please. 

  • 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. 

3 Replies

  • vhsn's avatar
    vhsn
    Frequent Visitor

    I assume you are using Table?

     

    PersonID | Name | ContactDate 

    with count on the contactDate?

    If so, you can just right click on Name or PersonID (either should work) and select "Display items with no data".

    • PBI5851's avatar
      PBI5851
      Icon for Helper V rankHelper V

      vhsn 
      Will try that, but the other issue which i forgot to mention is i have a card that is supposed to read 11 members (as in total count of members) and then change when slicer of date is moved. So opening the report, and date slicer not being "touched" (indicating full range), the card should be 11 and then 4 if date slicer range is selected from 1/1/23 - 3/1/23

      Is that even possible ?

  • Anonymous's avatar
    Anonymous
    Not applicable

    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.