How to Add Multiple Lines in Power BI Line Chart?

Power BI line chart allows you to add multiple lines which helps to compare different sets of data over time. This helps to identify trends, patterns, and relationships between the different datasets, providing deeper insights into your data.

Do you want to learn how to create multiple lines in a Power BI line chart? In this Power BI tutorial, we will see how to add multiple lines to the Power BI line chart.

Also, we will cover some of the below examples.

  • Power BI line chart multiple lines for each year
  • Power BI line chart multiple lines filter

How to create multiple lines in a Power BI line chart.

Here, we will see how to create multiple lines in a Power BI line chart.

For example, we will use the below Financial Excel sheet to create a Line chart.

Microsoft Power BI line chart multiple lines

We will display the sales and profit based on Segment in the line chart. Therefore, the sales and profit columns will be represented as two lines in the Power BI line chart, as shown below.

Power BI line chart multiple lines
  • Open Power BI Desktop, and then click on Get data -> select Excel Workbook. Or you can directly click on Excel Workbook.
Microsoft power bi line chart with multiple lines

Then select the Excel sheet from your local system; in the Navigator window, select the table and click on the Load button.

How to create power bi line chart multiple lines
  • Select the Line chart from the visualization pane to create a Line chart.
  • To show the sales based on segment, drag and drop the Sales and Profit columns, and Segment columns to the Y and X-axis, respectively.
How to create multiple lines in power bi line chart

This is an example of a Power BI line chart with multiple lines.

See also  Power Apps Camera Control - How to Use

Power BI line chart multiple lines for each year

Here, we will see how to display multiple lines for each year in the Power BI line chart.

For example, we will use the same sample Excel data, and we will use the columns Sales, Segment, and Year to show the sales trends for each year based on segment.

power bi line chart multiple lines for each year

To display multiple lines for each year in the Power BI line chart. Follow the below steps:

  • In Power BI Desktop, to create a line chart, from the visualization pane select the line chart.
  • To show the sales for each year based on segment, drag and drop the Sales column, Segment column, and Year column to the Y, X-axis, and Legend, respectively.
Microsoft power bi line chart multiple lines for each year

This is how to display multiple lines for each year in the Power BI line chart.

Power BI line chart multiple lines filter

Here, we will see how to filter multiple lines in the Power BI line chart.

We will use the same financial sample data to display the sum of profit by year, month, and segment in the line chart. Then, we will create a slicer containing segment types. By selecting multiple segments from the slicer, the line chart will show the profits of those segments by year and month, which looks like the screenshot below.

Power BI line chart multiple lines filter
  • In Power BI Desktop, to create a line chart, from the visualization pane, select the line chart.
  • To display the sum of profit by year, month, and segment in the line chart, Then drag and drop the profit, Date hierarchy[Year and month], and segment to the Y-axis, X-axis, and Legend.
power bi line chart multiple lines filter
  • To filter multiple lines in the line chart, we will create a slicer; for this, click on the slicer from the visualization pane.
  • Then, drag and drop the segment field to the Field.
Microsoft power bi line chart multiple lines filter
  • To select multiple segments from the slicer, press Ctrl and select the desired segments. This action will filter the lines in the Power BI line chart accordingly.
line chart multiple lines filter in Microsoft power bi

This is an example of how to filter multiple lines in a Power BI line chart.

See also  How to create SharePoint site columns from an Excel file in Power Automate?

Conclusion

In this Power BI tutorial, we saw how to create multiple lines in a Power BI line chart.

Also, we cover the different examples of Power BI line chart with multiple lines:

  • Power BI line chart multiple lines for each year
  • Power BI line chart multiple lines filter

You may also like:

>