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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

FIND/SEARCH in direct query mode

Hi All,

 

I have sql DB connectivity with direct query and I want to create a custom column with FIND/SEARCH dax. However I am getting error : "Function 'FIND' is not allowed as part of calculated column DAX expressions on DirectQuery models."

 

I have already turned on the setting from options to allow unrestricted measures in direct query mode but still not able to use. Can you help me?

 

Thank you in advance,

Niket

4 REPLIES 4
ManishSingh
New Member

Hi All,

 

I am trying to use Search or ContainsString function in Direct Query mode but getting the same error that these functions are not supported in direct query model. However in the list of optimized dax functions they are listed.

Also, there is no option in the latest power bi desktop version to allow unrestricted measures in direct query mode.

Please help as this issue has become a major bottleneck for us.

v-haibl-msft
Employee
Employee

@Anonymous

 

I’ve got response from the Product Team.

 

DirectQuery pushes calculated column calculations to the underlying database, therefore some DAX functions are not supported as the underlying database doesn't have corresponding operation. In this case, SEARCH and FIND functions are actually supported but the user must specify all 4 arguments: SEARCH("-", [Email], 1, 0). That's because the 2 argument version of the functions returns an error when a match is not found while the 4 argument version resturns a number which the user can use to decide whether a match is found.

 

Best Regards,
Herbert

Anonymous
Not applicable

What do you mean by [Email]? for me the second parameter is only showing up measures to select from. there is no option to select from existing columns. i am working against SAP HANA direct query.

v-sihou-msft
Employee
Employee

@Anonymous

 

I reproduced same issue as yours. We have reported it internally.

 

Regards,

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.