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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Dunner2020
Post Prodigy
Post Prodigy

Line graphs: Overall avg line and multiple avg lines on one graph

I got two tables date and a fact table. The date table contains date-related information whereas the fact table contains information about call handling that includes call handle time in mins and agent-name who handles the call and call date. Now I want to make a visualization where one line graph shows the overall average call handle time each month. I also want to show the average call handle time for each agent. So, I created two measures as follows:

 

Overall avg time = 

CALCULATE(AVERAGE(Fact_Table[Contact handle time (mins)]),ALLSELECTED(Fact_Table[Agent Name]))
 
Avg Time by Agent =  AVERAGEX(VALUES(Fact_Table[Agent Name]),  AVERAGE(Fact_Table[Contact handle time (mins)]))
 
When I show the above measures along with Month Name and Agent Name on the Table visual it works. However, when I tried to plot the same information on a line graph it did not. I put Month Name on the x-axis, and both measures on y-axis, which showed two line graphs. I tried to bring in Agent Name in the legend field, but it did not let me put in. I can only put in Agent-Name in the legend field when there is only one measure on the y-axis field. Is there any way to show these multiple line graphs on same visual?
 
I want something like as shown below:
sample.png
 
Sample data here
3 REPLIES 3
Ashish_Mathur
Super User
Super User

Hi,

With 2 measures dragged there, you can drag Agent to either the X-axis or to Small Multiples well.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Dunner2020
Post Prodigy
Post Prodigy

@Ashish_Mathur , added sample file in the actual post

Ashish_Mathur
Super User
Super User

Hi,

Share the download link of the PBI file and show the problem there.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.