Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Error while executing DAX for selecting a range of values from a single table

Hi all,

I'm getting this following error while executing the below DAX. Could anyone pls help me to find to what went wrong?

 

A function 'CALCULATE' has been used in a True/False expression that is used as a table filter expression. This is not allowed.

 

 
 
 
 

 

Many Thanks,

Praveen.

  • Hi Anonymous,

     

    look at the error and on your DAX statement.

    Your second CALCULATE in filter expression of your first CALCULATE is not allowed.

     

    Calculate Syntax: CALCULATE ( <Expression> [, <Filter> [, <Filter> [, … ] ] ] )

    https://dax.guide/calculate/

     

    Best Regards,

     

    Marcus

     

  • Hi Anonymous


    maybe your closing bracket (Line 10) is on the wrong line and it belongs to the first CALCULATE (Line 4).

     

     

2 Replies

  • mwegener's avatar
    mwegener
    Icon for Most Valuable Professional rankMost Valuable Professional

    Hi Anonymous,

     

    look at the error and on your DAX statement.

    Your second CALCULATE in filter expression of your first CALCULATE is not allowed.

     

    Calculate Syntax: CALCULATE ( <Expression> [, <Filter> [, <Filter> [, … ] ] ] )

    https://dax.guide/calculate/

     

    Best Regards,

     

    Marcus

     

  • mwegener's avatar
    mwegener
    Icon for Most Valuable Professional rankMost Valuable Professional

    Hi Anonymous


    maybe your closing bracket (Line 10) is on the wrong line and it belongs to the first CALCULATE (Line 4).