Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago

How to anonymize data within a matrix:

Hi,

 

I have a matrix that displays the summation of participant data across 3 categories by participant. See screenshot of the matrix below:

Basically, I want to mask the numeric position of the team member and display all team members as "Team Member" solely. 

 

I want to display this (edited in Paint):

 

Is this possible in Power BI? I know how to do this in other contexts but not sure how to do this within a BI tool like Power BI, without losing the relationship between the data points and the individual participants. 

 

If this is not possible, any other ideas about how to anonymize data while still keeping the phrase "Team Member" within the user name?

 

 

3 Replies

  • mahoneypat's avatar
    mahoneypat
    Microsoft Employee

    I would approach this as follows in query:

    1. Unpivot all the Team Member (1,2,3) columns

    2. Group the table on Team Member, and in advanced option choose Keep All Rows/Do Not Aggregate

    3.  Add an index column while it is grouped (this will be your anonymous employee ID).  If you prefer, add a prefix to that column with "Team Member ".

    4. Delete the original column with Team Member names

    5. Expand the needed columns from the grouped table column

    6. Load the table

    7. Make visuals with the new anonymous column as columns in a matrix visuals

     

    If this works for you, please mark it as solution.  Kudos are appreciated too.  Please let me know if not.

    Regards,

    Pat

     

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hey, mahoneypat,

       

      I've already created an anonymous employee ID through the "Team Member" column. I want to display all data points as "Team Member" within the matrix, since the client did not want to see the numeric ID. Is this possible? 

       

      So, referring to the 2nd image posted, I want to display "Team Member" for all columns of the matrix. Does that make sense?

       

      Thanks!

      • mahoneypat's avatar
        mahoneypat
        Microsoft Employee

        I misunderstood, I thought you had anonymized those just for the post and you have actual names in your data, so I gave you a way to make those say "Team Member x".  There needs to be differences between the values in the column for them to separate into in the matrix visual, so I don't think you can do that.

         

        One option would be to make the color of the column headers match the background and then put a text box/rectangle over the column headers that just says "Team Members" across all the columns together.

         

        If this works for you, please mark it as solution.  Kudos are appreciated too.  Please let me know if not.

        Regards,

        Pat