Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Distinct Count

Hi,   I couldn't see an answer in the forum... so here it goes. Thanks in advance.   I have a list of projects (ProjectID) in my table Projects-all. Each of them has different organisations (Orga...
  • Anonymous's avatar
    Anonymous
    6 years ago

    Hi, so Total and Average are all not correct? Try this:

     

    Number Coll Org=

    COUNTROWS(GROUPBY(FILTER('projects-all','projects-all'[Type]="COLLAB_ORG"),'projects-all'[Organisationid],'projects-all'[projectid]))

     
    Number PP=
    COUNTROWS(GROUPBY(FILTER('projects-all','projects-all'[Type]="PP_ORG"),'projects-all'[Organisationid],'projects-all'[projectid]))
     
    Av COLLAB_ORG =
    VAR NumProject=COUNTROWS(GROUPBY(FILTER('projects-all','projects-all'[Type]="COLLAB_ORG"),'projects-all'[projectid]))
    RETURN
    DIVIDE([Number Coll Org],NumProject)
     
    Av PP =
    VAR NumProject=COUNTROWS(GROUPBY(FILTER('projects-all','projects-all'[Type]="PP_ORG"),'projects-all'[projectid]))
    RETURN
    DIVIDE([Number PP],NumProject)