Results 1 to 3 of 3

Power Query Custom Function colum as text

Threaded View

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

    Power Query Custom Function colum as text

    Hi
    if I have a custom function ;


       ( atable as table )=> 
    let
        Custom1 = atable,
        #"Added Custom" = Table.AddColumn(Custom1, "Custom", each let txt = List.Select( Text.Split( [Text], " "), (A)=>  Text.Length( A ) = 8 ) ,
     rs = List.Select(  txt, each
      Text.Start( _, 3 ) = Text.Upper(  Text.Start(_,3)) 
                                 and Value.Type( Number.From ( Text.Middle( _, 3,3))) = type number  
                                  and Text.Lower( Text.End(_,2)) = Text.End(_,2) ) 
               in Text.Combine(  rs, ", " ))
    in
        #"Added Custom"
    but I do not want the column hard coded Text.Split( [Text], " "),

    so I added the column as a variable in the function, ( atable as table, col as text)=>

    but this does not seem to work and not sure why? I did think Table.Column( atable , col ) but pretty sure this would be a list so no good ,
    anyway end up with the added column but it's blank, what am I doing wrong.

    Richard.
    Attached Files Attached Files

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 to work on a list
    By Dicken in forum Office 365
    Replies: 4
    Last Post: 04-29-2024, 09:44 AM
  2. Power Query Custom replacer function
    By Dicken in forum Office 365
    Replies: 10
    Last Post: 12-03-2023, 12:03 PM
  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. Power Query Formula Inserting Custom text
    By Rastancu in forum Excel General
    Replies: 12
    Last Post: 10-28-2019, 08:30 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