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
Evanpooley_2
New Member

Add an extra condition

Hello,

I am creating a dashboard that shows the total average score for each student

This is done by calculating the total "Score" and dividing it by the amount of "ClassCodes" per "Student or StudentID"

Currently I have a measure that does the total score divided by Classcode but cant figure out how to add "By Student ID"

 

This is the correct result when i apply a visual level filter to my current measure

Graph.PNG

 

This is my current measure

 

Score divided by Count of classcode =
DIVIDE(
    SUM('SB_STAGING_ASSESSMENT_RESULTS_UNIQUE'[Score]),
    DISTINCTCOUNT('SB_STAGING_ASSESSMENT_RESULTS_UNIQUE'[classcode])
)

 

If possible i would like to add "Student ID" to this as anything i try doesnt filter to the student

Any help is appreciated 

Thanks

2 REPLIES 2
Anonymous
Not applicable

@Evanpooley_2 

 

If you start creating models according to Best Practices, you won't have such issues. Please read this: Understand star schema and the importance for Power BI - Power BI | Microsoft Docs

 

AND FOLLOW IT ALWAYS TO THE LETTER if you want to keep your sanity and be able to understand what your DAX is doing. Also, this will make your work understandable to others.

NandanHegde
Super User
Super User

Hey,
Can you please show sample data for your datasets and its relationship.
Also it would be great if you could show the current status value and expected value with some dummy numbers from sample dataset.

That might help us in better understanding the use case




----------------------------------------------------------------------------------------------
Nandan Hegde (MSFT Data MVP)
LinkedIn Profile : www.linkedin.com/in/nandan-hegde-4a195a66
GitHUB Profile : https://github.com/NandanHegde15
Twitter Profile : @nandan_hegde15
MSFT MVP Profile : https://mvp.microsoft.com/en-US/MVP/profile/8977819f-95fb-ed11-8f6d-000d3a560942
Topmate : https://topmate.io/nandan_hegde
Blog :https://datasharkx.wordpress.com

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.