Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowJuly 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more
Hello,
I have an SQL query that contains the NOT LIKE function. I have googled for an hour and didn't find a good solution. Can anyone help me with this task? Here is my SQL query:
SELECT
*
FROM Product
Where Description NOT LIKE '' and Product NOT LIKE 'CMI'
Thanks in advance
Solved! Go to Solution.
In Power Query, it would be:
Table.SelectRows(TableName, each not Text.StartsWith([Description], "") and not Text.StartsWith([Product], "CMI"))
Power Query doesn't have a LIKE operator. You'd use Text.Contains, Text.StartsWith, or Text.EndsWith depending on what you are trying to do. It does have a NOT operator, which is simply not - all lower case.
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI ReportingIn Power Query, it would be:
Table.SelectRows(TableName, each not Text.StartsWith([Description], "") and not Text.StartsWith([Product], "CMI"))
Power Query doesn't have a LIKE operator. You'd use Text.Contains, Text.StartsWith, or Text.EndsWith depending on what you are trying to do. It does have a NOT operator, which is simply not - all lower case.
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI ReportingHi @mdor
I'm not sure what your question is? That is a valid SQL statement although you may be looking to amend the the 2nd part to
and Product NOT LIKE '%CMI%'
That said, if you write your own query like this you will break query folding and PQ will do all the hard work instead of the SQL database.
https://docs.microsoft.com/en-us/power-query/power-query-folding
You would be better off loading the table into PQ then filtering out the data you want within PQ and then letting it tell the SQL database what data to send.
Phil
Proud to be a Super User!
Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.
Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.
| User | Count |
|---|---|
| 8 | |
| 5 | |
| 5 | |
| 4 | |
| 4 |