Forum Discussion

belurrashmi's avatar
belurrashmi
Frequent Visitor
9 years ago
Solved

How to group data from multiple columns from single table?

I have a table of this kind 

Defect IDCreatedCreatorAssigneeResolved
101/05/2017ABC
201/06/2017BB 
301/07/2017ACC
401/08/2017ACC
501/09/2016FGH
601/10/2016ABC
701/11/2016AAF
801/12/2017AFG
901/13/2017AF

G

 

 

I would like to  combine all the Users data and see the information in this way

 

Created in monthNo.of unique users
May-20172
Jun-20163
May-20164

 

 

  • i would unpivot the three colums (creator asignee and resolved in power query)

    and then do a distinctcount in a measure on them sliced by the date.

     

     

3 Replies

  • vanessafvg's avatar
    vanessafvg
    Community Champion

    i would unpivot the three colums (creator asignee and resolved in power query)

    and then do a distinctcount in a measure on them sliced by the date.

     

     

  • MarcelBeug's avatar
    MarcelBeug
    Community Champion

    That is some magic transformation.

     

    Apparently all dates are in January (because of 01/13/2017 in the last row) and it results in data in May and June.

    Also in your table there are no "users".

    Of course we can assume that Creators, Assignees and Resolved are users, but one of the first things I was taught in IT is to assume nothing.

     

    Can you explain the logic how your source data is transformed into the result?

  • v-qiuyu-msft's avatar
    v-qiuyu-msft
    Community Support

    Hi belurrashmi,

     

    Assume you want to count distinct Creator columns based on Year and Month values, you can use Group By in Query Editor. Also you can use DAX to create a calculated table like below:

     

    Table = SUMMARIZE('Table1','Table1'[Year],'Table1'[Month],"No.unicusers",DISTINCTCOUNT('Table1'[Creator]))

     

     

    Best Regards,
    Qiuyun Yu