How to create Clustered Column Chart grouped by month and person

I'm trying to create a clustered column chart that would show a sum of values, by month for each person with each cluster representing the same month. The data that are in the following format:

enter image description here

I need to create something like this:

enter image description here

Each bar is a person with a sum for the specific month. The person is appearing multiple times in the table for each month so we need a sum for each month.

I've managed in power bi to create a chart grouped by person and month, but i need the opposite as explained above:

enter image description here

Any ideas?

Upvotes: 1

Views: 3015

Answers (1)

Marcus
Marcus

Reputation: 3995

It looks like you have a lot of columns. The correct way to handle this would be to unpivot your table to transform your columns into rows. See this small sample table:

Table, prior to unpivoting.

We want to transform the data so that for each column you get one row with Personen, Date and Value. To do this, you can select the name column (and other columns that you want to not pivot), right click, and select Unpivot Other Columns. This will yield the following:

Table, after unpivoting.

You can edit the column names and data types to get the following table:

enter image description here

And here is your visual, using Date as Axis information, Personen as Legend information:

Finished!

Upvotes: 1

Related Questions