cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
BarryRoss Frequent Visitor
Frequent Visitor

Dax Expresssion for LIKE Function

Looking to set up RLS for budget holders and some cells may contain several names.

 

SQL would look like this - [Budget Holder] LIKE "%John Doe%" - 

 

Is there an quivalent DAX command?

1 ACCEPTED SOLUTION

Accepted Solutions
Nathaniel_C Super Contributor
Super Contributor

Re: Dax Expresssion for LIKE Function

@BarryRoss 

Let me refer you to a post that Marco Russo made.

https://www.sqlbi.com/blog/marco/2011/12/30/string-comparison-in-dax/


Let me know if you have any questions.

If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos are nice too.
Nathaniel

View solution in original post

3 REPLIES 3
Nathaniel_C Super Contributor
Super Contributor

Re: Dax Expresssion for LIKE Function

@BarryRoss 

Let me refer you to a post that Marco Russo made.

https://www.sqlbi.com/blog/marco/2011/12/30/string-comparison-in-dax/


Let me know if you have any questions.

If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos are nice too.
Nathaniel

View solution in original post

BarryRoss Frequent Visitor
Frequent Visitor

Re: Dax Expresssion for LIKE Function

Thanks for that.  Came up with this:

 

[Budget Holder] = IF(SEARCH("Craig Clement",[Budget Holder],,0)>0,"Craig Clement")

 

But only returns rows where Craig Clement is sole Budget Holder and not rows where role is joint (ie. "Craig Clement / Gillian Milne"0

AndreyBear Frequent Visitor
Frequent Visitor

Re: Dax Expresssion for LIKE Function

Share you pbix?


Helpful resources

Announcements
Ask Amir Anything

Exclusive LIVE Community Event No. 2 – Ask Amir Anything

Next in our Triple A series: Ask Amir Netz questions about the latest updates, features and future.

October 2019 Community Highlights

October 2019 Community Highlights

October was a busy month in the community. Read the recap article to learn about some of the events and content.

New Solution Badges

New Solution Badges

Two waves of brand new solution badges are coming! Read the article for more information on our new community badges.

Analytics in Azure virtual event

Analytics in Azure virtual event

Experience a limitless analytics service built to ingest, prep, manage, and serve data for immediate use in Power BI.

Users Online
Currently online: 197 members 2,003 guests
Please welcome our newest community members: