If(ProductName like '*bike*', 'Bikes')
The like operator and string comparisons in Power BI
Qlik's like matches against a pattern with * (any characters) and ? (one character). DAX's closest equivalents are CONTAINSSTRING, which is case-insensitive and supports * and ?, and SEARCH. Power Query has no wildcard operator. Use Text.Contains, Text.StartsWith and Text.EndsWith, with a comparer to ignore case.
Short answer: Translate x like '*bike*' to CONTAINSSTRING(x, "bike") in DAX or Text.Contains([x], "bike", Comparer.OrdinalIgnoreCase) in M. For x like 'A*', use Text.StartsWith.
What it does in Qlik
string1 like string2 returns True (-1) if string1 matches the pattern, where * is any run of characters and ? is one character. For lists of patterns, use WildMatch.
Qlik example
If(ProductName like '*bike*', 'Bikes', 'Other')
If(Code like 'A??-*', 'Type A')Power BI equivalent
DAX
Group = IF ( CONTAINSSTRING ( T[ProductName], "bike" ), "Bikes", "Other" )
// like 'A??-*' -> anchor with LEFT / MID
Type A = IF ( LEFT ( T[Code], 1 ) = "A" && MID ( T[Code], 4, 1 ) = "-", "Type A" )Power Query
= Table.AddColumn(Src, "Group", each
if Text.Contains([ProductName], "bike", Comparer.OrdinalIgnoreCase)
then "Bikes" else "Other", type text)
// like 'A??-*'; Text.Middle doesn't error on short codes, Text.At would
= Text.StartsWith([Code], "A", Comparer.OrdinalIgnoreCase) and Text.Middle([Code], 3, 1) = "-"Gotchas and behaviour differences
CONTAINSSTRINGandSEARCHlook for the pattern anywhere in the text. Qlik's like is anchored, so'A*'means "starts with A". Add aLEFTorRIGHTcheck, or use Text.StartsWith in M, to anchor.- Power Query string functions are case-sensitive by default. Pass
Comparer.OrdinalIgnoreCaseas the last argument.
Official documentation
- String operators (like) (Qlik Help)
- CONTAINSSTRING function (DAX) (Microsoft Learn)
- Text.Contains (Power Query M) (Microsoft Learn)
- Text.StartsWith (Power Query M) (Microsoft Learn)
Related pages
Match(Region, 'North', 'South')
Match, MixMatch and WildMatch
Match, MixMatch and WildMatch test a value against a list and return its position (or 0). They differ in case sensitivity and wildcard support, and so do DAX and Power Query, in the opposite direction from what you might expect.
Partial / different approach
If(cond, then, else)
If and nested If
Qlik's If() maps directly to DAX IF and to Power Query's if ... then ... else. Long nested Ifs are cleaner as SWITCH(TRUE(), ...). Qlik's numeric booleans (-1/0) are the main difference.
Direct equivalent
Mid(Code, Index(Code, '-') + 1)
Left, Right, Mid, Index and Len
DAX has the same 1-based functions: LEFT, RIGHT, MID, LEN, plus FIND or SEARCH in place of Index. In Power Query the functions are zero-based. Text.PositionOf returns -1 when nothing is found, where Qlik's Index returns 0, and Text.Middle starts at offset 0.
Direct equivalent
Spotted an error or a better pattern? QlikToDax is maintained by a working BI consultant; corrections are welcome via the About page. Last reviewed 2026-10-25.