How to write SQL Like in Power BI using SEARCH DAX Function

This tutorial will cover,
  • - How to write SQL %LIKE% in Power BI using SEARCH DAX
  • - How to use SEARCH DAX in IF condition in Power BI
  • - How to use variables in Power BI
  • - How to use CALCULATETABLE DAX in Power BI
  • - How to use IFERROR DAX in Power BI
This is a sample function,

Create a table using SEARCH Dax

January_Data_table = CALCULATETABLE(Sheet1,
SEARCH("Jan",Sheet1[Month ],1,0)>0,
SEARCH("Brit",Sheet1[Name],1,0)>0)

Use SEARCH in IF condition

Search Test =
VAR Result1 = IFERROR(SEARCH("Jan",Sheet1[Month ],1,0),-1)
Return IF(Result1 > 0, "Found", "Not Found")



Comments