Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Error in 'EVALUATE' - dax

Hi,

 

I have an sql query in which there are multiple conditions in where clause. I want to implemet that in dax and for that I am using evaluate function in calculate column. But it gives me error : The synatx for 'Evalute' is incorrect. Please help me with that. If this inot the right way then please suggest me other workaround.

 

The query which I am trying to convert is like this: 

 (((id between 1 and 100 or id in (105,110,115)
and id not between 50 and 75 and rate in (3,4,5))
or (id between 50 and 75) and rate in (3,4,5,6) ))

1 ACCEPTED SOLUTION
TeigeGao
Solution Sage
Solution Sage

Hi @Anonymous ,

In PowerBI, we can use DAX query directly, it is not supported to use EVALUATE() function. This function is used when executing DAX query in SQL Server Management Studio (SSMS) and open-source tools like DAX Studio, please refer to this document: https://docs.microsoft.com/en-us/dax/dax-queries.

To convert your SQL query to DAX query, you can use AND() and OR() function in DAX, like below:

OR(id >= 1 && id <= 100, id in {105,110, 115})

Best Regards,

Teige

View solution in original post

1 REPLY 1
TeigeGao
Solution Sage
Solution Sage

Hi @Anonymous ,

In PowerBI, we can use DAX query directly, it is not supported to use EVALUATE() function. This function is used when executing DAX query in SQL Server Management Studio (SSMS) and open-source tools like DAX Studio, please refer to this document: https://docs.microsoft.com/en-us/dax/dax-queries.

To convert your SQL query to DAX query, you can use AND() and OR() function in DAX, like below:

OR(id >= 1 && id <= 100, id in {105,110, 115})

Best Regards,

Teige

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors