Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
Rickz
New Member

Line Chart with multiple lines

Hi all!

There's this condition like I have a data of number of items sold in the month by 10 employees in two months.

E.g.,

John sold 100 packets in July and 120 packets in Aug.

The data is already sorted and available in table format for both the months separately.

I wish to display the data in the form of a Line Chart showcasing their performance stats for the two months. The two lines one for each month shall display if the sales by the employee has increased/decreased.

I tried putting the total sales column in the Y-axis field but when I insert the total sales column of 2nd month in the Y-axis, it shows a straight line and a same total value for all the employees.

Please help!

3 REPLIES 3
Rickz
New Member

@Thejeswar ,

 

Thanks alot for the response, but this is pretty much I had in mind.

 

The issue is like I have the aforementioned data of two different months in two different sheets.

Therefore, I do not have any kind of date' column in either of the sheets. Because the data is itself aggregate of a month each and not just in discrete (date wise) manner.

Rickz_0-1674635429845.png

The data is for example in this manner.

One sheet for Aug and one for Sept.

There are no other columns showing dates or months.

I just wish to get this data displayed in a line chart having Employees on X-axis and their sales on Y-axis where one line would show the trend for Aug month and the second line would display for Sept month.

This way both the trends in each month and between each month can be portrayed at once.

Hope you're getting what I am in need of.

The actual data is quite confidential and way different from this. Therefore need help through this example. 

Thejeswar
Community Champion
Community Champion

@Rickz ,

Sorry for the delay in my response.

 

You can create a date column with the default date as 1st day of each month the data is from.

This way you will be able to differentiate months.

 

If you see below, I am just including one date column in Aug dataset

Thejeswar_0-1675097499995.png

 

Doing the same for September dataset as well. Then combining the dataset. It looks as below

Thejeswar_1-1675097543862.png

 

If I use this table and build my visual as explained earlier in the thread, the below is the output.

Thejeswar_3-1675097727560.png

 

Using Month in the Legend box

 

Hope this clarifies

Thejeswar
Community Champion
Community Champion

Hi @Rickz ,

If you keep the tables separate, this is how it will behave.

 

Do the following steps. 

1. Append both the tables. The Resultant table will be having all the 3 columns Employee Name, Month and No of Packets column in it.

2. Create a line chart as below

x-axis should be month

y-axis should be Total Sales

Legend should be Employee Name

 

This way you will have two lines, One for each employee trending over Months in x-axis

Regards,

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

Find out what's new and trending in the Fabric Community.

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.