Jherb
Jherb

Reputation: 43

Turn row of data into Line Chart, PowerBi

I have mutiple rows of data which correspond to different companies and I need to be able to change the report based of the company title. However I have these rating averages by Month that I want to be able to put into a line chart but I can't seem to figure out how to it. This is what the data looks like: enter image description here

Ideally I want the line chart to look something like this: enter image description here

Upvotes: 0

Views: 1567

Answers (1)

Frostytheswimmer
Frostytheswimmer

Reputation: 718

You need to pivot the data to look like this:

|Company  |Period    |Value   |
-------------------------------
|CompA    |January   |10000   |
|CompB    |January   |99999   |
|CompA    |February  |88888   |

etc...

You can do this in the 'Edit queries' section 'PowerQuery'

Assuming a dataset that looks like this: enter image description here

Bring it in to PowerBI and Select All the Month Columns ( Shift/ctrl + Click ): enter image description here

Then hit 'unpivot columns' under the transform tab: enter image description here

Then I would add a 'column from examples' to switch Jan in to 1 and Feb in to 2 and march in to 3, etc...: enter image description here

Finally, dump it into a chart and slicer: enter image description here

Remember to set the value to average:

enter image description here

Upvotes: 1

Related Questions