cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
praveenkumarv Regular Visitor
Regular Visitor

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.

 

 
error.JPG
 
 
 
error2.JPG

 

Many Thanks,

Praveen.

2 ACCEPTED SOLUTIONS

Accepted Solutions
Highlighted
Super User III
Super User III

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

Hi @praveenkumarv,

 

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

 

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Proud to be a Super User!

View solution in original post

Super User III
Super User III

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

Hi @praveenkumarv


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

 

 

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Proud to be a Super User!

View solution in original post

2 REPLIES 2
Highlighted
Super User III
Super User III

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

Hi @praveenkumarv,

 

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

 

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Proud to be a Super User!

View solution in original post

Super User III
Super User III

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

Hi @praveenkumarv


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

 

 

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Proud to be a Super User!

View solution in original post

Helpful resources

Announcements
Coming Soon: T-Shirt Design Contest

Coming Soon: T-Shirt Design Contest

Keep your eyes open for our upcoming T-shirt design contest!

Meet the 2020 Season 1 Power BI Super Users!

Meet the 2020 Season 1 Power BI Super Users!

It’s the start of a new Super User season! Learn all about the new Super Users and brand-new tiered recognition system.

Super User Challenge: Can You Solve These?

Super User Challenge: Can You Solve These?

We're celebrating the start of the New Super User season with our first ever Super User 'Can You Solve These?' challenge.

Power Platform Online Conference

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

Top Solution Authors
Top Kudoed Authors