Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago

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. : )

1 Reply

  • v-yulgu-msft's avatar
    v-yulgu-msft
    Microsoft Employee

    Hi Anonymous,

     

    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