Results 1 to 6 of 6

Power query parameter to select result

Threaded View

  1. #1
    Forum Contributor
    Join Date
    08-03-2021
    Location
    London
    MS-Off Ver
    365
    Posts
    689

    Power query parameter to select result

    Hi, in excel, which I've included, I have a formula to pick out the alphabet, numbers or sprcial characters from a string.
    and the reusult is determined by switch looking to a drop down list,

    I have tried to create this so ;

     Table.AddColumn(Source, "Custom", each let
     ttolist = 
    Text.ToList( [Text] ), alltext  = List.RemoveMatchingItems( ttolist, { "0".."9"} ), 
    numbers = 
    List.RemoveMatchingItems( ttolist, alltext ) , 
    special =  List.RemoveMatchingItems(  List.Transform(  alltext, (A)=> Text.Lower(A)) , {"a".."z"} ) , 
    alpha = List.RemoveMatchingItems( alltext, special) 
    in Text.Combine( special  ))

    but the last part following the in I do not want hard coded I have created a paramer of the options, but this does not work when plugged into
    text.combine, I have attached all this. I think the problem is that it sees the value from the parameter as "text", not referring to the variable,


    I have tried putting it withing the let so simplified ;

     Table.AddColumn(#"Changed Type", "Custom", each let caps  =  Text.Split(  Text.Upper([Text]) ," ") ,
    lower =  Text.Split( [Text], " ") , 
    result = Text.Combine(  selectorparameter  ) 
    in result  )
    but this does not work either? help?

    Richard.
    Attached Files Attached Files
    Last edited by Dicken; 05-21-2024 at 10:40 AM. Reason: Added file for clarity of problem

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Power query Custom function / parameter query
    By Dicken in forum Office 365
    Replies: 0
    Last Post: 03-23-2022, 10:41 AM
  2. Parameter Value for Power Query
    By AllisterB in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-02-2021, 04:32 AM
  3. Create a Parameter Query for US Stocks in Power Query
    By alansidman in forum Tips and Tutorials
    Replies: 0
    Last Post: 10-24-2020, 06:36 AM
  4. Trying to Create a Power Query Parameter where you can Select Multiple Values
    By nickb123 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-10-2020, 10:12 PM
  5. Updating a Parameter through VBA in Power Query
    By RAC81_12 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-24-2020, 09:49 AM
  6. Power Query - Parameter not working
    By vibajajo64 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-20-2018, 01:08 AM
  7. Dynamic Parameter Using Power Query
    By NeedForExcel in forum Excel General
    Replies: 1
    Last Post: 06-16-2016, 02:51 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