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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Eclektics
Regular Visitor

Calculate expression not working correctly.

Hi all,

 

I'm pretty new to Power BI and DAX functions and I'm having a bit of trouble trying to get one to calculate correctly. I have exam data that grades a learners performance with either a fail, pass, merit or disitinction. I've created 5 columns that works out what the grades would be if the pass mark for each section was reduced by 1 point each time.

 

When I've tried to count how many distinctions we would have if the pass mark was reduced by 1 point, it's counting other values as well and I'm not sure why. 

 

Here is my DAX expression:= 

Writing -1 Disitnction = CALCULATE(COUNT('Pass Rates'[Writing -1]),'Pass Rates'[Writing -1]="Distinction")
 
And here is my table, ignoring the last 4 columns you can see I'm getting results for merit and pass even though that isn't in my expression. Any help anyone can offer would be greatly appreciated. : )
pOWER bi tABLE.png
1 REPLY 1
v-yulgu-msft
Employee
Employee

Hi @Eclektics,

 

Would you please illustrate "works out what the grades would be if the pass mark for each section was reduced by 1 point each time."? Please share sample data in source data table, including table structure and detailed records. Also, make it clear that what your desired result is. How to Get Your Question Answered Quickly

 

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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