The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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.
I am mean screenshot
Did I answer your question? If so, please mark my post as a solution!
Proud to be a Super User!
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).
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
Did I answer your question? If so, please mark my post as a solution!
Proud to be a Super User!
I've tried that, but it puts the X-Axis attributes vertically instead of horizontall with the line:
Put Attribute on X-axis and Value on Value in field section
Did I answer your question? If so, please mark my post as a solution!
Proud to be a Super User!
Can you paste SS your field values in visualization pane ?
Did I answer your question? If so, please mark my post as a solution!
Proud to be a Super User!
I don't fully understand what you mean by paste SS the field values. Can you elaborate please?
This is a cut-down version of the data source. For the line chart I need it to show the sum of the 2023-Totals figures for the two sales codes only (Account 1 and 2) and then a line going to the sum of the 2022-Totals figure again for the same two sales codes (Account 1 and 2).