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
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

Highlighted
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
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

Highlighted
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
Exclusive LIVE Community Event #3 – Ask Arun Anything

Exclusive LIVE Community Event #3 – Ask Arun Anything

Join us in the third Triple A event!

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 BI Desktop Update - February 2020

Power BI Desktop Update - February 2020

We are super excited for our update this month, as we are releasing two of our top community requests!

Power Platform Online Conference

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

Top Solution Authors