Forum Discussion
How to create a line chart?
Hello all,
I have an Excel data source and am trying to find a way of creating a line chart in Power BI.
The data source has a list of account codes, descriptions and columns showing the individual totals for each account code over four years.
Creating a line chart in Excel is as easy as selecting the column headings for the x-axis and the Sales totals for the four years as for the y-axis.
Can anyone tell me the best way of doing this in Power BI?
This is what the Excel data looks like, along with the Excel line chart.
8 Replies
- mh2587Super User
Unpivot the data first in power query and then drage the line chart in visual convas and put attribute in x axis and value in Y axis
- CH_MJR79Helper II
that's how I've done it. There are four attributes, named Attribute-2020, Attribute-2021, Attribute-2022 and Attribute-2023, along with four values (individual measures) named Sales2020, Sales2021, Sales2022 and Sales2023.
I think it is stacking/showing the values in a vertical line because the Attribute fields aren't date/time fields (they are not supposed to be).
- mh2587Super User
I am mean screenshot