Table of Contents
In Power BI, you can plot multiple lines on a line chart by first selecting the line chart visualization from the toolbar. Then, drag and drop the fields that you want to plot onto the “Axis” and “Values” sections of the chart. Each field will create a separate line on the chart. You can also add more fields to the “Legend” section to further differentiate the lines. Additionally, you can customize the appearance and formatting of the lines, as well as add additional features such as labels and tooltips, to enhance the visual representation of the data.
Often you may want to plot multiple lines in a line chart in Power BI.
Fortunately this is easy to do and the following step-by-step example shows how to create the following line chart with multiple lines in Power BI:
Let’s jump in!
Step 1: Load the Dataset
First, we will load the following dataset into Power BI that contains information about the total sales made of three different products during various years:
Step 2: Insert the Line Chart
Next, click the Report View icon on the left hand side of the screen:
Then, on the right side of the screen under Visualizations, click the Line chart icon:
An empty line chart will be inserted:
Step 3: Populate the Chart
Next, drag the Year variable under the X-axis label, then drag the Product A, Product B and Product C variables under the Y-axis label:
The x-axis displays the year and the y-axis displays the sales by year.
Each of the individual lines represents one of the three products.
Feel free to modify the title of the chart along with the axis titles to make the chart easier to read:
Additional Resources
The following tutorials explain how to perform other common tasks in Power BI: