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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

How to create a line graph with grouped data.

I have data that looks similar to:

student84_0-1618924479720.png

How would I create a line graph that shows the heart rate by intensity for each first name, last name and gender group, as so:

kop.jpeg

1 ACCEPTED SOLUTION
pmay
Resolver I
Resolver I

To solve this problem, first off I would combine the names, as there doesn't seem to be any reason to split by surname or first name, you would always be splitting by full name, right?  This can be done in PowerQuery - please ask if you're unsure.

 

Then, I would create a Line Chart visual, have intensity as the Axis, Heart Rate (as a Sum) as the Values, and then your new "Combined Name" field as your Legend.

 

I think this would give you the data you're trying to visualise.  If gender after the name is critical, then you can combine the gender into the new name field.

View solution in original post

5 REPLIES 5
pmay
Resolver I
Resolver I

To solve this problem, first off I would combine the names, as there doesn't seem to be any reason to split by surname or first name, you would always be splitting by full name, right?  This can be done in PowerQuery - please ask if you're unsure.

 

Then, I would create a Line Chart visual, have intensity as the Axis, Heart Rate (as a Sum) as the Values, and then your new "Combined Name" field as your Legend.

 

I think this would give you the data you're trying to visualise.  If gender after the name is critical, then you can combine the gender into the new name field.

Anonymous
Not applicable

Am I correct that you are saying I should group the dat determining one of the lines into a new column and use that column as the legend?

 

Would I still be able to add a filter for just the first name, last name or gender, and would the visual still respond to that filter?

Yes.  Wasn't quite what I had in mind but that would also work, and even gives you more flexibility than what I suggested.

VijayP
Super User
Super User

@Anonymous 

Try using Small multiples in Line Chart 




Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
MY Blog || My YouTube Channel || Connect with me on Linkedin || My Latest Data Story - Ageing Analysis

Proud to be a Super User!


Anonymous
Not applicable

That would create multiple graphs if I am correct and is not that which I am looking for.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

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.

Top Solution Authors