Yes, column names and their contents can be used as wildcards to search for strings in other columns in Power Query.
To use this feature, you can create a custom function that takes the column name and the search string as inputs, and then dynamically generate a filter expression that targets the specified column.
For example, the following code searches for all rows where the "Product" column contains the string "apple", using the "Product" column name as a wildcard:
let Source = Excel.CurrentWorkbook(){[Name="SalesData"]}[Content], SearchString = "apple", FilterExpression = "= Text.Contains([" & Product & "], """ & SearchString & """)", FilteredRows = Table.SelectRows(Source, each Expression.Evaluate(FilterExpression, #table({Product}, {{[Product]}}))) in FilteredRows
Note that this code assumes that the data is stored in an Excel table named "SalesData", and that the "Product" column exists in this table. You'll need to adjust the code accordingly for your specific data source and column names.
Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss
Asked: 2023-07-09 07:21:33 +0000
Seen: 15 times
Last updated: Jul 09 '23
What are the components that explain the state of ECMAScript execution context specification?
How can OMNET++ be used to simulate M/M/c/c?
How can I use oversampling to address a problem?
What is the method to determine the most precise categorization of data using Self Organizing Map?
Does the ZXing Android Embedded library have support for GS-1?
What are the steps required to utilize the LFW dataset in CNN-based face verification using Keras?
What is the reason for not being able to include CURDATE() in a check?