cancel
Showing results for
Did you mean:

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Frequent Visitor

## Need to calculate aggregated values based on slicer selections

Aggregation confusion here...

I have a table of student results (one row per student attempt at a particular course), and am working on a report which allows admin staff to multi-select up to four courses in a slicer, and then see a table output for which students have the highest aggregate mark for that particular selection of courses. E.G. for a selection of courses Basketweaving1001, Basketweaving1002, RocketSci1001 and RocketSci2002 only, the visual should show the highest ranking aggregate scores in descending order, e.g. Joe Brown, Jane Smith, Tom Jones etc etc.

I've been trying to write a measure using SUMX and ALLSELECTED and TOPN but have been tying myself up in knots - can anyone help?

Many TIA

Philippa

1 ACCEPTED SOLUTION
Solution Sage

File attached

5 REPLIES 5
Solution Sage

This description is not clear.

"E.G. for a selection of courses Basketweaving1001, Basketweaving1002, RocketSci1001 and RocketSci2002 only, the visual should show the highest ranking aggregate scores in descending order, e.g. Joe Brown, Jane Smith, Tom Jones etc etc."

What is "highest ranking aggregated score"? Nobody knows... When you post a question on a forum, you should be maximally clear about what you want and how the logic should work. Pictures do help as well.

Frequent Visitor

Thank you for taking the time to provide feedback, @daXtreme

Highest ranking aggregate score related to the marks students receive for those four courses, all added together (i.e. Aggregated). So if a student received marks of (for example) 72, 68, 50 and 60 for those four courses, their Aggregated score would be the sum of those four, i.e. 250.

I then need to be able to rank students according to these scores, e.g. if student 1 gets 250, student 2 gets 320, student 3 gets 315, student 4 gets 244, then what I need to see is a table showing

Student 2 - 320

Student 3 - 315

Student 1 - 250

Student 4 - 244

I hope that is a little clearer to anyone who is trying to help.

Solution Sage

File attached

Frequent Visitor

Thank you @daXtreme. I don't think I would have figured that out alone. Much appreciated.

Philippa

Solution Sage

You would but maybe you would have had to study DAX a bit more 🙂 Everything is achievable by anyone. The only question is how much time it'd take.

Announcements

#### Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

#### Power BI Monthly Update - June 2024

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

#### New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

Top Solution Authors
Top Kudoed Authors