Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Rows Total

I have data with Rep name and its total sale in various rectors. Excel file with 4 rows as below: Rep Q1 Q2 Q3 Q4 A1  $ 36,114,600  $   65,771,922  $ 20,900,400  $ 16,500,000 A2  $...
  • SteveHailey's avatar
    4 years ago

    Hello Anonymous. Here is what I would do:

    Go to Power Query (via Home > Transform Data > Transform Data)

    Then Right Click the "Rep" column, and choose "Unpivot Other Columns"

     

    Then double click the "Attribute" column header and rename it "Quarter", then double click the "Value" column header and rename it "Sales".

     

    Then at the top left, choose Close and Apply.

    Now back out in the Report view, create a new measure: 

     

     

    Total Sales = SUM( 'Table'[Sales] )

     

     

    Then create a Matrix visual, with Rep on Rows, Quarter on Columns, and Total Sales on Values.

     

    In the Formatting pane, you can turn off Column subtotals under the Subtotals group.

     

    The final result should look like this:

    In case it's helpful, here's a link to PBIX file.

    -Steve