Power BIPowerBI tutorials

Create a Power BI line chart

Power BIPowerBI tutorials

Create a Power BI line chart

The Power BI line chart is useful for visualizing trends. For example, you can use this to create a sales trend, a temperate trend, and so on. Let me show you how to create a line chart in Power BI with an example.

For this Power BI Line Chart demo, we will use the SQL data source that we created in our previous article. Therefore, see the article Connect Power BI to SQL Server to understand the Power BI data source.

How to create a line chart in Power BI

To create a line chart, first drag and drop the sales amount from the Fields section to the region of the canvas. Automatically create a column chart.

create-a-power-bi-line-chart-1-2723885

Next, let me add the name of the state province to the Axis section. You can do this by dragging State Province to the Axis section, or just check the State Province column.

create-a-power-bi-line-chart-2-1907307

By clicking on the line chart below the Display section, automatically converts the Column Chart to Line Chart.

In the following screenshot, you can see the line chart showing the sales trend by state province name.

create-a-power-bi-line-chart-3-1148757

Create a line chart in Power BI approach 2

First, click on the line chart below the Display section. It will automatically create a line chart with dummy data.

create-a-power-bi-line-chart-4-3860935

To add data to the Power BI line chart, we have to add the required fields:

  • Axis: Specify the name of the column that represents the trend.
  • Values: Any numerical value such as sales amount, total sales, etc.

Let me drag the Sales Amount from the Fields section to the Values field and the State Province Name to the Axis section.

create-a-power-bi-line-chart-5-8624869

Let me sort the data by state province name (by default it's sorted by Sales Amount). To do this, click on the (3 dots) in the upper right corner and select the Sort by stateProvinceName option.

create-a-power-bi-line-chart-6-5950395

Now you can see the right Trend

create-a-power-bi-line-chart-7-6932814

Let me add one more field i.e Total Product Cost to Values section. Compare the trend of the Sales Amount with the Total Cost of the product.

create-a-power-bi-line-chart-8-1081801

Hover over any position to display the Sales Amount and Total Product Cost tooltip

create-a-power-bi-line-chart-9-8058528

Let me apply a quick format to this Power BI line chart

NOTE: I suggest that you refer to the article Formatting Line Chart to understand the steps required to format these lines.

create-a-power-bi-line-chart-10-6640734

The Power BI line chart is useful for visualizing trends. For example, you can use this to create a sales trend, a temperate trend, and so on. Let me show you how to create a line chart in Power BI with an example.

For this Power BI Line Chart demo, we will use the SQL data source that we created in our previous article. Therefore, see the article Connect Power BI to SQL Server to understand the Power BI data source.

How to create a line chart in Power BI

To create a line chart, first drag and drop the sales amount from the Fields section to the region of the canvas. Automatically create a column chart.

create-a-power-bi-line-chart-1-2723885

Next, let me add the name of the state province to the Axis section. You can do this by dragging State Province to the Axis section, or just check the State Province column.

create-a-power-bi-line-chart-2-1907307

By clicking on the line chart below the Display section, automatically converts the Column Chart to Line Chart.

In the following screenshot, you can see the line chart showing the sales trend by state province name.

create-a-power-bi-line-chart-3-1148757

Create a line chart in Power BI approach 2

First, click on the line chart below the Display section. It will automatically create a line chart with dummy data.

create-a-power-bi-line-chart-4-3860935

To add data to the Power BI line chart, we have to add the required fields:

  • Axis: Specify the name of the column that represents the trend.
  • Values: Any numerical value such as sales amount, total sales, etc.

Let me drag the Sales Amount from the Fields section to the Values field and the State Province Name to the Axis section.

create-a-power-bi-line-chart-5-8624869

Let me sort the data by state province name (by default it's sorted by Sales Amount). To do this, click on the (3 dots) in the upper right corner and select the Sort by stateProvinceName option.

create-a-power-bi-line-chart-6-5950395

Now you can see the right Trend

create-a-power-bi-line-chart-7-6932814

Let me add one more field i.e Total Product Cost to Values section. Compare the trend of the Sales Amount with the Total Cost of the product.

create-a-power-bi-line-chart-8-1081801

Hover over any position to display the Sales Amount and Total Product Cost tooltip

create-a-power-bi-line-chart-9-2959424

Let me apply a quick format to this Power BI line chart

NOTE: I suggest that you refer to the article Formatting Line Chart to understand the steps required to format these lines.

create-a-power-bi-line-chart-10-2291398
error: Attention: Protected content.