+ Reply to Thread
Results 1 to 5 of 5

Power Query ; Custom function to work on a list

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

    Power Query ; Custom function to work on a list

    Hi,

    I have made a custom function to work on a list and insert a range of values, I have not worked these into the function yet,

    the fucntion in based on this

    Please Login or Register  to view this content.
    and the list.Accumulate to insert rows at the above positions,

    Please Login or Register  to view this content.
    But I have made a basic function not incorporating the rows to insert or grouping by number, but I can only get it to work
    by type it in so; Function ( list) , but can't figure out how to use the options to enter parameter ; invoke dialog box ?
    is there a way to select a list as you would a table? I don't know whether to use ( func name as list) => or just leave it out ?

    I have attached work book with example and function,

    Richard.
    Attached Files Attached Files
    Last edited by Dicken; 04-27-2024 at 07:31 AM.

  2. #2
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    MS365 Apps for enterprise
    Posts
    5,973

    Re: Power Query ; Custom function to work on a list

    You are missing attachment to your post
    "Progress isn't made by early risers. It's made by lazy men trying to find easier ways to do something."
    ― Robert A. Heinlein

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

    Re: Power Query ; Custom function to work on a list

    Sorry will amend.

  4. #4
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    MS365 Apps for enterprise
    Posts
    5,973

    Re: Power Query ; Custom function to work on a list

    1. In order to allow list to be selectable, you need it to be converted into table column. Table column ex:TableName[ColumnName] is considered list in PQ. This is partly due to limitation on PQ UI. Alternately you can pass List as is (i.e. query name that returns List type). i.e. add blank query and source = F(Query1)

    2. If you need one or more parameter to be optional. Have it in the parameter but nullable type. ex: (alist as list, groupe as nullable number). Of course, you'll need to handle it in the function itself.

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

    Re: Power Query ; Custom function to work on a list

    Thank you, at least I can stop trying to do what can't be done.


    Richard.

+ 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. Power Query Custom replacer function
    By Dicken in forum Office 365
    Replies: 10
    Last Post: 12-03-2023, 12:03 PM
  2. [SOLVED] Power Query custom function variable to make table a list
    By Dicken in forum Office 365
    Replies: 10
    Last Post: 07-08-2023, 11:13 AM
  3. How to update a custom function in Power Query
    By MangoFresh in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-10-2023, 08:58 AM
  4. Power Query Custom function for running total
    By Dicken in forum Office 365
    Replies: 6
    Last Post: 10-29-2022, 10:58 AM
  5. Power query Custom function / parameter query
    By Dicken in forum Office 365
    Replies: 0
    Last Post: 03-23-2022, 10:41 AM
  6. Replies: 1
    Last Post: 02-14-2022, 06:23 AM
  7. Power Query - Invoke Custom Function
    By leukep in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-12-2017, 02:18 PM

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