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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
IHam
Helper III
Helper III

Two lines on a line chart

Hi, I am trying to display two lines on a line graph. The two lines need to be one for exam performance and the other for performance in reports. The data is education data so seeing seperate lines for reports and exams side by side is informative. The x-axis is a number based on when the data was collected and y the percentile. 

The column "filter" is used as a legend to split the line up into two lines. However, as you can see from the screen shots, it doesn't work. as report and exam data are collected at different times, it doesn't connect the lines together. Any help would be great.image 1.pngwith legend addedwith legend added

4 REPLIES 4
v-juanli-msft
Community Support
Community Support

Hi @IHam 

If you add [date] to the "X-axis", you can change "X-axis" type from to "Categorical" to "Continuous".

But you say the column added to "x-axis" is of type Text, it can only hold the "Categorical" type.

What text column do you add?

 

 

Best Regards

Maggie

Thanks for this. At the moment the x-axis is text sorted by a whole number column. If I change the x-axis to the whole number column, it changes it to two lines however the problem is that the numbers are not of equal-spacing and the x-axis loses its decriptive value - it only gives the whole numbers not what they represent. Using the drill downs doesn't work either.

v-juanli-msft
Community Support
Community Support

Hi @IHam 

First please clear me:

which column do you add to "X-axis"? "date" type, "number type", text type"?

Do you want the points in screenshot 2 to connnect to form a line?

also for the broken lines?

 

Best Regards

Maggie

Hi, the x-axis is a text column sorted by a whole number column to get the text information in order. What I need is for the two series to connect, so that would be two distinct lines. One for the report series and one for the exam series. Hopefully that clarifies things. Many thanks for your help

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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