+ Reply to Thread
Results 1 to 1 of 1

Power Query: Check if Field contains text from list

  1. #1
    Registered User
    Join Date
    01-15-2018
    Location
    Midwest
    MS-Off Ver
    Office 365
    Posts
    55

    Power Query: Check if Field contains text from list

    I am not familiar with PQ enough to understand what I am doing wrong, but I think I am in the ballpark. Can you help me resolve the proper way to do this, please?

    I am trying to check and see if the a text field contains any of the keywords/text I have in another list. I am assuming the Text.Contains or List.ContainsAll is the route I should go down, but I cannot get either to work. I keep getting an expression error.

    My list (File_Name_Type_List) includes things like
    OM_
    AS_
    Cx_
    PID_
    BAS_

    I am trying to check the file name (Item Name) to see if the field contains any of the items list in the File_Name_Type_List.

    Code that I have tried and failed using:

    Please Login or Register  to view this content.
    The Error I get is:

    Expression.Error: We cannot convert a value of type List to type Text.
    Details:
    Value=List
    Type=Type
    I have also tried:

    Please Login or Register  to view this content.
    The error I get is:

    Expression.Error: We cannot convert the value "7_81.rws" to type List.
    Details:
    Value=7_81.rws
    Type=Type
    Last edited by learning new things; 11-07-2018 at 03:42 PM. Reason: added List.ContainsAll code

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Power Query: Reading a text or csv file that is publicly available on the Web?
    By learning new things in forum Excel General
    Replies: 6
    Last Post: 10-31-2018, 03:12 PM
  2. Power Query - Replace If Text is Found
    By brent_milne in forum Excel General
    Replies: 1
    Last Post: 10-25-2018, 11:00 AM
  3. Sub-Forum for Excel Power Tools (Power Query, Power Pivot & Power BI)
    By chullan88 in forum Suggestions for Improvement
    Replies: 10
    Last Post: 06-28-2018, 02:25 PM
  4. [SOLVED] Power Query / Get & Transform - filter text contains based on list
    By SHI.NL in forum Excel General
    Replies: 8
    Last Post: 05-14-2018, 04:53 PM
  5. [SOLVED] Power Query / Get & Transform filtering on text
    By SHI.NL in forum Excel General
    Replies: 5
    Last Post: 04-28-2018, 11:50 AM
  6. [SOLVED] Power Query: Group by category, list text items on separate rows
    By JimDandy in forum Excel Charting & Pivots
    Replies: 5
    Last Post: 08-05-2017, 12:11 AM
  7. [SOLVED] Power Pivot Measure so I can put a text field in If condition is not true
    By rv02 in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 01-06-2016, 08:59 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1