March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
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!
Solved! Go to Solution.
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.
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
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.
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!
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
134 | |
91 | |
89 | |
64 | |
58 |
User | Count |
---|---|
201 | |
137 | |
107 | |
72 | |
68 |