Forum Discussion

orihait's avatar
orihait
Helper I
7 years ago
Solved

group by row count

hi guys, i've got a question for you. i have two relative datasets, one is data related to projects with the client id as one of the keys, the other is another dataset with client id and client n...
  • Anonymous's avatar
    Anonymous
    7 years ago

    Hi orihait 

     

    Not a straight forward one but this is possible.

     

    you need to create a new table with the following DAX

     

    number of projects = GENERATESERIES(1,100,1)
    this will generate a column with 1 to 100 in the cells
     
    Then add a column with
    Number of Clients = COUNTAX(FILTER(projects,projects[client ID]='number of projects'[Value]),projects[client ID] = 'number of projects'[Value])
     
    you will end up with a table with 2 columns, a list of how many clients could be attached to a project and how many time that happens. So:
    1 client attached = 2 projects
    2 clients attached = 2 projects
    3 clients attached = 0 projects
    etc
     
    Then you can create your visual.
     
    If this solves your issue please mark this as the solution :)