Forum Discussion
power bi line chart - multiple lines single table
Hi All,
My data looks like this. I want to create a line chart where the Date is the X axis, the Amount is the Y axis, and each company has it's own line. Can anyone help?
| Company | Date | Amount |
| Company A | 24-Jan | 1366 |
| Company A | 24-Feb | 1815 |
| Company A | 24-Mar | 1974 |
| Company A | 24-Apr | 1176 |
| Company B | 24-Jan | 1413 |
| Company B | 24-Feb | 1889 |
| Company B | 24-Mar | 1405 |
| Company B | 24-Apr | 1822 |
| Company C | 24-Jan | 1889 |
| Company C | 24-Feb | 1545 |
| Company C | 24-Mar | 1775 |
| Company C | 24-Apr | 1753 |
> In the Visualizations pane on the right, click on the Line chart icon.
>In the Fields pane, drag the Date column to the Axis field.
>Drag the Amount column to the Values field.
>Drag the Company column to the Legend field.
Yes you can have the different lines for each company by dragging "company" column on the legend field of the line chart as shown in the below snapshot :
2 Replies
- mh2587
Super User
> In the Visualizations pane on the right, click on the Line chart icon.
>In the Fields pane, drag the Date column to the Axis field.
>Drag the Amount column to the Values field.
>Drag the Company column to the Legend field.
- AnkitaaMishra
Super User
Yes you can have the different lines for each company by dragging "company" column on the legend field of the line chart as shown in the below snapshot :