Forum Discussion

acroberts's avatar
acroberts
Frequent Visitor
9 years ago
Solved

Matrix/Pivot Question

Hello, I am trying to create a Power BI Matrix from sales data that looks like:

 

 

To create a summary, by sales person, by count of their role in a sale:

 

 

I'm probably overthinking this, but can't seem to elegantly accomplish this without building side tables which extract each role and person and then merging those tables together.   Anyone have ideas on this?



 

 

  • acroberts

     

    Hi, in Edit Query Select the 3 columns (Except Opp ID) and Transform Unpivot Columns.

     

    You'll obtain something like this:

     

     

    Change the name of the Columns. Close & Apply

     

    Finally in a Matrix

     

3 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    You aren't going to get away from building a separate person table.   Once you have done that you can probably write measures --

     

    Total Id := DISTINCTCOUNT(MyTable[Identify])

    Total Develop := DISTINCTCOUNT(MyTable[Develop])

    ...

     

  • Vvelarde's avatar
    Vvelarde
    Community Champion

    acroberts

     

    Hi, in Edit Query Select the 3 columns (Except Opp ID) and Transform Unpivot Columns.

     

    You'll obtain something like this:

     

     

    Change the name of the Columns. Close & Apply

     

    Finally in a Matrix