Power BI Line Chart is useful to visualize the Trends. For example, you can use this to create a Sales trend, Temperate Trend etc. In this article we will show you, How to Create a Line Chart in Power BI with example.
For this demonstration we are going to use the SQL Data Source that we created in our previous article. So, Please refer Connect Power BI to SQL Server article to understand the Data Source.
How to Create a Power BI Line Chart
In order to create a Line Chart, first Drag and Drop the Sales Amount from Fields section to Canvas region. This will automatically create a Column Chart as we shown in below.
Next, let me add State Province Name to Axis section. You can do this by dragging State Province to Axis section, or simply check mark the State Province column.
By clicking the Line Chart under the Visualization section will automatically convert the Column Chart into Line Chart. From the below screenshot, you can see the Line Chart that shows the Sales Trend by State Province Name.
Create a Power BI Line Chart- Approach 2
First, click on the Line Chart under the Visualization section. This will automatically create a Line Chart with dummy data as shown in below screenshot.
In order to add data to Line Chart, we have to add required fields:
- Axis: Please specify the Column Name that represent the Trend.
- Values: Any Numeric value such as sales amount, Total Sales etc.
Let me drag the Sales Amount from Fields section to Values field, and State Province Name to the Axis section.
Let me sort the data by State Province Name (By default, it is sorted by Sales Amount). To do this, click on the … (3 dots) on top right corner, and select the Sort By StateProvinceName option as we shown below.
Now you can see the proper Trend
Let me add one more filed i.e., Total Product Cost to Values section. This will compare the trend of Sales Amount against the Total Product Cost.
Hover over any position will show you the Tool-tip of Sales Amount, and Total Product Cost
Let me do some quick formatting to this Line Chart
NOTE: I suggest you to refer Format Line Chart article to understand the steps involved in formatting these Lines.
Thank You for Visiting Our Blog