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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

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.