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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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. 

@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
Resident Rockstar
Resident Rockstar

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

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

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.