+ Reply to Thread
Results 1 to 5 of 5

Power Query making custom function refer to column [ column]

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

    Power Query making custom function refer to column [ column]

    Hi,
    I want to refer to a column in a custom function,
    so the problme is ;
    Please Login or Register  to view this content.
    as just putting [variable name ] or ["variable name"] did not work
    I thought I could re write as ; using Table.Column,
    Please Login or Register  to view this content.
    , which would add a column as long as the source column data type was text,
    I think,

    so my staring point is to remove spaces;

    Please Login or Register  to view this content.
    It's fine if if just make a function that works on the table , so all column names as in function but I want to select the column for text . split and
    remove at then end. I seem to have tried all different combinations of "text' [text] ["text"] etc. but all no good,
    i have attached workbook with what I would like as an end result an my attempts.

    Richard.
    Attached Files Attached Files

  2. #2
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent Monthly Channel / Insiders Beta
    Posts
    8,913

    Re: Power Query making custom function refer to column [ column]

    I think you want something like this:

    Please Login or Register  to view this content.
    Rory

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

    Re: Power Query making custom function refer to column [ column]

    Thanks, yes, i had just had a bit of a eureka moment, when I tried;

    Please Login or Register  to view this content.

    Which is not the final answer but did was progress, shall persevere, I want to get this sorted as I have a more interesting problem re unpivot.


    Richard.

  4. #4
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent Monthly Channel / Insiders Beta
    Posts
    8,913

    Re: Power Query making custom function refer to column [ column]

    Quote Originally Posted by Dicken View Post
    shall persevere, I want to get this sorted
    Did what I just gave you not work? It does here.

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

    Re: Power Query making custom function refer to column [ column]

    Sorry, yes it does, I had to go out, and did not mark it up. as i said, it was just that I had stumbled / guessed at Record field just before your text arrived, so at least I
    was on the right lines even if what I had did not work. Yours did .

    Richard.

    Sorry no rep, but you have one in thought.
    Last edited by Dicken; 02-16-2024 at 03:14 PM.

+ 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] Filter a Custom Column in Power Query
    By chi05 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 08-11-2023, 03:05 PM
  2. Power Query Custom Column Formula
    By sharonca in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-01-2023, 03:16 PM
  3. [SOLVED] Power Query - Custom column
    By chris1089 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-13-2023, 01:22 PM
  4. Custom Permutations Column in Power Query from two columns in the same Query
    By PaintPaddy in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-11-2019, 02:48 PM
  5. [SOLVED] Power Query Custom Column Formula
    By whiskeybravo91 in forum Excel Charting & Pivots
    Replies: 4
    Last Post: 08-06-2018, 11:10 AM
  6. Power Query Custom Column Formula
    By whiskeybravo91 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-06-2018, 09:57 AM
  7. Help with Power Query Custom Column Formula
    By travis.cook21 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-16-2016, 01:45 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