Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

MATRIX

Hi, I'm trying to use a MATRIX for my dataset. My input data source has data in the following format:   Date H_Staff A_Staff T_Staff St_Count 30/05/20 1 3 2 34 30/06/20 3 7 3 ...
  • Greg_Deckler's avatar
    6 years ago

    Anonymous - Try unpivoting your last 4 columns in Power Query Editor and this this should be very easy.

  • Anonymous's avatar
    Anonymous
    6 years ago

    Hi Anonymous 

    Just like Greg_Deckler and mahoneypat  ā€˜s reply said Unpivot in Power Query Editor is a good way to achieve your goal.

    The way to rename the column header is easy, you can right click the column headers in Power Query Editor or in Fields and choose Rename.

    And you may try my way.

    I build a table like yours to have a test.

    Use raw data to build a matrix.

    Then you select Show on rows in Values.

    Result:

    The result by this way may don’t have column headers, but you can use the original data model to achieve your goal.

    And you can build a text box and use group by right-click after selecting both two visuals.

    You can download the pbix file from this link: MATRIX

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. 

     

    Best Regards,

    Rico Zhou