Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago

Count filtering

Hi all, I have this similar table:

 

Name                              Project

Jose Carlos                          A

David Fernandez                 B

Carlos Andres                      C

Jose Carlos                          D   

Jose Carlos                          E

Andrea Marin                      F

 

I need a card to count the total number of projects per person.

 

For example, if I use a slicer for projects and I choose Project A the card shows me that Jose Carlos has 3 projects.

 

Thanks a lot

6 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous ,

     

    You can use the below measure.

     

    Count of Projects =
    var _cc = COUNT(ProjectDetials[Name])
    Var _sel = SELECTEDVALUE(ProjectDetials[Name])

    return
    if (ISBLANK(_sel),CONCATENATE("Total Project ",_cc),CONCATENATE(CONCATENATE(CONCATENATE(_sel, " has "),_cc)," projects "))
     
     
     
    Regards,
    Harsh Nathani
     
     
    Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
    In case it does not help, please provide additional information and mark me with @
    • Anonymous's avatar
      Anonymous
      Not applicable

      Anonymous it actually works when i use a Slicer for Name, but i need it to work with a Project Slicer. Example: in a slicer for project a choose A then the card will show the total projects of the person for the Project A in this case 3 projects.

       

      Thanks

      • Petazo's avatar
        Petazo
        Helper I

        Hello:

        If I understood correctly, you need something like this

        foto filtrada.PNGTargeted Photos

        foto sin filtrar.PNGUntargeted Photo

        The idea is that per user will show you the total of projects assigned to it, and by segmenting it shows only the user or users assigned to the project with all the pro-tests assigned

        Is that all right? The formula is in the picture.

        I'm reviewed.

        Best regards