Forum Discussion
Need help with plotting a line chart
- 10 months ago
Hii EaglesTony
Use a Line chart and place ReportingDate on the X-axis, Total on the Y-axis, and Title in the Legend. This will create one line per Title (ABC, DEF) and show how the values increase or decrease across the reporting dates. No extra measures are needed the default line chart handles this setup correctly.
example below :
- 10 months ago
To build your line chart in Power BI, start by inserting a Line Chart visual and assigning ReportingDate to the X-axis. This ensures the dates appear in order across the chart. Make sure the ReportingDate column is set to a proper Date data type so the visual behaves correctly.
Next, place the Title field in the Legend area. This will create a separate line for each title—such as ABC and DEF—so you can easily compare their trends. Then add the Total field to the Values section, which will plot the numerical changes over time and show whether each title is increasing, decreasing, or staying the same.
Be aware that DEF appears twice on the same date in your data. Power BI will sum these values by default, resulting in 20 instead of 10. To avoid this, you can remove duplicates in Power Query or change the aggregation for Total from Sum to Average. Once these steps are set, your line chart will clearly display the pattern of changes for each title.
To build your line chart in Power BI, start by inserting a Line Chart visual and assigning ReportingDate to the X-axis. This ensures the dates appear in order across the chart. Make sure the ReportingDate column is set to a proper Date data type so the visual behaves correctly.
Next, place the Title field in the Legend area. This will create a separate line for each title—such as ABC and DEF—so you can easily compare their trends. Then add the Total field to the Values section, which will plot the numerical changes over time and show whether each title is increasing, decreasing, or staying the same.
Be aware that DEF appears twice on the same date in your data. Power BI will sum these values by default, resulting in 20 instead of 10. To avoid this, you can remove duplicates in Power Query or change the aggregation for Total from Sum to Average. Once these steps are set, your line chart will clearly display the pattern of changes for each title.