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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
michaelccdf
Helper I
Helper I

Plotting multiple series in a line chart

This is perhaps really simple but I'm stuck.  I have a table like the following

 

Year / Gender /  SchoolID / Class / Final Mark

 

I want to build a line chart like the below, where I could compare Boys with School A.  This seems like it would be simple to do but I can't figure it out.  Every time I put an additional dimension in it gives me a hierarchy (Boys from School A, Girls from School A, etc).  I want each dimension to be independent.  Thanks for the help!

chart_example.png

 

1 ACCEPTED SOLUTION
v-ljerr-msft
Microsoft Employee
Microsoft Employee

Hi @michaelccdf,

 

If I understand you correctly, an alternative solution could be that creating 5 measures to calculate the average of final mark separately for (Boys, SchoolA, etc), then show all 5 measures as Values, and the Year column as Axis on the line chart to get the expected result in your scenario.

 

The formulas below are for your reference. Smiley Happy

Boys = CALCULATE ( AVERAGE ( 'Table1'[Final Mark] ), 'Table1'[Gender] = "Boy" )
Girl = CALCULATE ( AVERAGE ( 'Table1'[Final Mark] ), 'Table1'[Gender] = "Girl" )
SchoolA = CALCULATE ( AVERAGE ( 'Table1'[Final Mark] ), 'Table1'[SchoolID] = "SchoolA" )
SchoolB = CALCULATE ( AVERAGE ( 'Table1'[Final Mark] ), 'Table1'[SchoolID] = "SchoolB" )
Everyone = AVERAGE ( 'Table1'[Final Mark] )

 

Regards

View solution in original post

2 REPLIES 2
v-ljerr-msft
Microsoft Employee
Microsoft Employee

Hi @michaelccdf,

 

If I understand you correctly, an alternative solution could be that creating 5 measures to calculate the average of final mark separately for (Boys, SchoolA, etc), then show all 5 measures as Values, and the Year column as Axis on the line chart to get the expected result in your scenario.

 

The formulas below are for your reference. Smiley Happy

Boys = CALCULATE ( AVERAGE ( 'Table1'[Final Mark] ), 'Table1'[Gender] = "Boy" )
Girl = CALCULATE ( AVERAGE ( 'Table1'[Final Mark] ), 'Table1'[Gender] = "Girl" )
SchoolA = CALCULATE ( AVERAGE ( 'Table1'[Final Mark] ), 'Table1'[SchoolID] = "SchoolA" )
SchoolB = CALCULATE ( AVERAGE ( 'Table1'[Final Mark] ), 'Table1'[SchoolID] = "SchoolB" )
Everyone = AVERAGE ( 'Table1'[Final Mark] )

 

Regards

Thanks so much, this did the trick!

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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