+ Reply to Thread
Results 1 to 3 of 3

Power Query - Custom column

  1. #1
    Forum Contributor
    Join Date
    01-06-2015
    Location
    london,uk
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2307) 64-bit....Windows 10 Enterprise
    Posts
    118

    Power Query - Custom column

    Hi*


    I'm new to power query. I'm trying to create a custom column which says, 'if text in column A contains the word 'monthly' then divide value in column B by (5 * 4)


    How would that look in a custom column.
    Last edited by chris1089; 03-14-2023 at 11:28 AM.

  2. #2
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Power Query - Custom column

    try this https://learn.microsoft.com/en-us/po...itional-column

  3. #3
    Registered User
    Join Date
    03-09-2023
    Location
    Nevada, USA
    MS-Off Ver
    2021
    Posts
    10

    Re: Power Query - Custom column

    Here's how you can create a custom column that checks if text in column A contains the word 'monthly' and then divides the value in column B by (5 * 4):

    In the Power Query Editor, select the table containing columns A and B.

    Click on the 'Add Column' tab and select 'Custom Column'.

    In the 'Custom Column' dialog box, type in the following formula:

    = if Text.Contains([A], "monthly") then [B] / (5*4) else [B]

    This formula checks if the text in column A contains the word 'monthly'. If it does, it divides the value in column B by (5*4). If it doesn't, it simply returns the value in column B.

    Give a name to the new column in the 'New column name' field.

    Click 'OK' to create the new column.

    That's it! You should now have a new column with the results you were looking for. If you have any further questions, feel free to ask!

+ 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. Add Custom column of its own query name in power query
    By ks.Prajnan in forum Excel General
    Replies: 3
    Last Post: 07-27-2022, 09:24 AM
  2. [SOLVED] Excel Power Query 'Custom Column"
    By Dicken in forum Office 365
    Replies: 4
    Last Post: 10-26-2021, 09:29 AM
  3. [SOLVED] Power Query Custom Column syntax help
    By L.J. in forum Excel General
    Replies: 6
    Last Post: 11-12-2019, 03:45 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

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