cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
schoden Helper III
Helper III

SQL not like something

Hi , Please help me

I want to write in DAX , the equivalent SQL code is below; 

 

SELECT * from table where table[column]<>'%After%'

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support
Community Support

Re: SQL not like something

hi  @schoden 

Use this logic to create a new table

New Table = FILTER('Table', SEARCH("After", 'Table'[Column],,0)=0)

https://docs.microsoft.com/en-us/dax/search-function-dax

 

Regards,

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
Super User II
Super User II

Re: SQL not like something

Hi @schoden 

for exampkle new table

Table = FILTER(ALL(Table), ISBLANK(SEARCH("After", Table[Column])))

do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

schoden Helper III
Helper III

Re: SQL not like something

@az38  Hi Thanks for the reply 

But it didnt give back correct result.   

Instead I used : 

 

FILTER(ALL(TABLE),  Table[Column] <>"After% " )  --- it worked for NOT LIKE SOMETHING 

 

But When I wrote the other way round, it didnt show values 

FILTER(ALL(TABLE),  Table[Column] ="After% " )  --- it didnt work for LIKE SOMETHING 

Super User II
Super User II

Re: SQL not like something

@schoden 

I  gave you other option.

 

 

Table = FILTER(ALL('Table'), ISBLANK(SEARCH("After", 'Table'[Column],,BLANK()))))

 

 

this SEARCH function will return blank if there is no matching 


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

Community Support
Community Support

Re: SQL not like something

hi  @schoden 

Use this logic to create a new table

New Table = FILTER('Table', SEARCH("After", 'Table'[Column],,0)=0)

https://docs.microsoft.com/en-us/dax/search-function-dax

 

Regards,

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
‘Better Together’ T-Shirt Contest – Winner Announced!

‘Better Together’ T-Shirt Contest – Winner Announced!

And the winner is...

Announcing the New Spanish Forum

Announcing the New Spanish Forum

Do you need help in Spanish? Check out our new Spanish community section.

April 2020 Community Highlights

April 2020 Community Highlights

Info on our Super Users, MBAS content and badges, and updates to our support articles. - Read the full Community Highlights.

MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

Top Solution Authors
Top Kudoed Authors