Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago

DAX showing error!

Hello,

 

I am trying to write the dax as below:

 

DIVIDE(CALCULATE(SUM(DE_C[TOTAL]),DE_C[RESPONSE] = "A"),CALCULATE(SUM(DE_C[TOTAL]),DE_C[RESPONSE] IN{"A","D","U"},0))
 
but pbi is showing me the below error:

Can somebody please help me. 

3 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    please give a sample data example in an excel sheet and also say what do you expect as an output so that i can help you

  • Smalfly's avatar
    Smalfly
    Responsive Resident

    Hi Anonymous ,

     

    please try this:

     

    DIVIDE(CALCULATE(SUM(DE_C[TOTAL]),DE_C[RESPONSE] = "A"),CALCULATE(SUM(DE_C[TOTAL]),DE_C[RESPONSE] IN{"A","D","U"}),0)
     
    It is most likely due to a misplaced closing bracket for the calculate function in the denominator.