Table.FindText Function in Power Query
The Table.FindText function returns a table containing only the rows that have the specified text within one of their cells or any part thereof. If the text is not found, an empty table is returned.
Syntax
Table.FindText(table as table, text as text) as table
The function has the following parameters:
- table: It specifies the table from which we want to find.
- text: It specifies the text that we want to find from the table. Please note the text specified is case sensitive.
Example: Find the rows in the table that contain "Esha".
Power Query M
let MyTable = Table.FromRecords( { [CustomerID = 1, Name = "Ashish", Country = "India"], [CustomerID = 2, Name = "Katrina", Country = "Australia"], [CustomerID = 3, Name = "Alia", Country = "China"], [CustomerID = 4, Name = "Vicky", Country = "India"], [CustomerID = 5, Name = "Mohini", Country = "Japan"], [CustomerID = 6, Name = "Meenakshi", Country = "China"], [CustomerID = 7, Name = "Esha", Country = "India"], [CustomerID = 8, Name = "Anjali", Country = "Australia"] } ), Return = Table.FindText(MyTable, "Esha") in Return
The output of the above code is shown below: