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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Anonymous
Not applicable

CONTAINSSTRING in EVALUATE error

Hey guys.

 

I'm trying to pull data from SSAS in Import mode using DAX Query. But having trouble with CONTAINSSTRING in EVALUATE statement. No matter how I change it, it gives me error every time.

EVALUATE
FILTER(
    ALL( 'Task'[appointment_type] ),
    CONTAINSSTRING( [appointment_type], "Callcenter" )
)
 
The error I get is following:
DataSource.Error: AnalysisServices: Query (4, 5) Failed to resolve name 'CONTAINSSTRING'. It is not a valid table, variable, or function name.
Any ideas?
 
IN operator also doesn't seem to work in EVALUATE statement.
 
1 ACCEPTED SOLUTION

@Anonymous  DAX queries in Analysis Services mainly incorporate a limited set of DAX functions, and not all the functions found in Power BI or Power Pivot are accessible within DAX queries.

The capabilities provided in DAX queries are influenced by the version and compatibility level configured for your Analysis Services instance.

View solution in original post

6 REPLIES 6
BeaBF
Memorable Member
Memorable Member

@Anonymous  Hi! Try with:

EVALUATE
FILTER(
ALL( 'Task'[appointment_type] ),
CONTAINSSTRINGEXACT( 'Task'[appointment_type], "Callcenter" )
)

BBF

Anonymous
Not applicable

Thx for your reply.

I don't see how a very similar function would make a difference. Anyway, it doesn't work.

@Anonymous you're right. Have you tried with the SEARCH?
EVALUATE
FILTER(
ALL( 'Task'[appointment_type] ),
SEARCH("Callcenter", 'Task'[appointment_type], 1, 0) > 0
)

BBF

Anonymous
Not applicable

Yes, I've tried different solutions and I can get it work. That's not the point here, though. I want to know why not all DAX functions work in DAX Query, what I'm missing.

@Anonymous  DAX queries in Analysis Services mainly incorporate a limited set of DAX functions, and not all the functions found in Power BI or Power Pivot are accessible within DAX queries.

The capabilities provided in DAX queries are influenced by the version and compatibility level configured for your Analysis Services instance.

Anonymous
Not applicable

Perfect. That's what I was looking for. Thank you!

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.