+ Reply to Thread
Results 1 to 11 of 11

Power Query - want to add formulas to query output

Hybrid View

kersplash Power Query - want to add... 07-19-2018, 02:24 AM
AliGW Re: Power Query - want to add... 07-19-2018, 02:38 AM
kersplash Re: Power Query - want to add... 07-19-2018, 02:42 AM
AliGW Re: Power Query - want to add... 07-19-2018, 02:45 AM
kersplash Re: Power Query - want to add... 07-19-2018, 02:50 AM
AliGW Re: Power Query - want to add... 07-19-2018, 02:51 AM
kersplash Re: Power Query - want to add... 07-19-2018, 02:55 AM
AliGW Re: Power Query - want to add... 07-19-2018, 03:00 AM
kersplash Re: Power Query - want to add... 07-19-2018, 03:15 AM
AliGW Re: Power Query - want to add... 07-19-2018, 03:16 AM
AliGW Re: Power Query - want to add... 07-19-2018, 06:16 AM
  1. #1
    Forum Expert kersplash's Avatar
    Join Date
    11-22-2016
    Location
    Perth
    MS-Off Ver
    Home 2016 (Windows 10)/Work 2013 Pro Plus (Windows 10)
    Posts
    2,012

    Power Query - want to add formulas to query output

    I have 2 sets of big data that I am merging together using Power Query.

    After the merge I have a worksheet that contains the full set of data in a table.

    I would like to add about 20 or 30 calculated columns to the end of the merged table, but at this stage I don't want these fields calculated within Power Query (the calculations are very complicated and are already in place).

    I can add a calculated column to the new table (using a good old fashioned excel formula), but when I refresh the merge query I lose the calculated field.

    Is there a way I have the best of both worlds, merge my data and include all my calculated columns together?

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2505 (Windows 11 Home 24H2 64-bit)
    Posts
    91,265

    Re: Power Query - want to add formulas to query output

    This is an issue that I have encountered, too, and I have not yet quite got my head around the correct workflow, so I'll be interested to see what others say. What I do is have another table on a separate worksheet and after refreshing a query, I manually copy and paste the table values into that (where I have my calculated columns). I suppose this could be done with a macro.

    There must be a more elegant solution, however, so I am looking forward to finding out what it is.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Expert kersplash's Avatar
    Join Date
    11-22-2016
    Location
    Perth
    MS-Off Ver
    Home 2016 (Windows 10)/Work 2013 Pro Plus (Windows 10)
    Posts
    2,012

    Re: Power Query - want to add formulas to query output

    That's what I currently do too. Be nice to have it all it one place.

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2505 (Windows 11 Home 24H2 64-bit)
    Posts
    91,265

    Re: Power Query - want to add formulas to query output

    Just found this: https://www.linkedin.com/pulse/dont-...p-wyn-hopkins/

    It seems to suggest it's possible, unless I'm misreading it.

    Maybe Sandy will know - he's good with PQ.

  5. #5
    Forum Expert kersplash's Avatar
    Join Date
    11-22-2016
    Location
    Perth
    MS-Off Ver
    Home 2016 (Windows 10)/Work 2013 Pro Plus (Windows 10)
    Posts
    2,012

    Re: Power Query - want to add formulas to query output

    That's different to what I see, the entire column disappears on Refresh.

    Office Pro Plus 2013

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2505 (Windows 11 Home 24H2 64-bit)
    Posts
    91,265

    Re: Power Query - want to add formulas to query output

    Yes, I agree, which makes me wonder what you and I are missing!

  7. #7
    Forum Expert kersplash's Avatar
    Join Date
    11-22-2016
    Location
    Perth
    MS-Off Ver
    Home 2016 (Windows 10)/Work 2013 Pro Plus (Windows 10)
    Posts
    2,012

    Re: Power Query - want to add formulas to query output

    But amazingly when I tick the box the new column stays and is updated with the query!!!

  8. #8
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2505 (Windows 11 Home 24H2 64-bit)
    Posts
    91,265

    Re: Power Query - want to add formulas to query output

    Oooh - does that mean it DOES work? If so, I'm off to try it.

  9. #9
    Forum Expert kersplash's Avatar
    Join Date
    11-22-2016
    Location
    Perth
    MS-Off Ver
    Home 2016 (Windows 10)/Work 2013 Pro Plus (Windows 10)
    Posts
    2,012

    Re: Power Query - want to add formulas to query output

    So far so good, also found other useful checkboxes in that spot to enable formatting and cell formatting to stay.

  10. #10
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2505 (Windows 11 Home 24H2 64-bit)
    Posts
    91,265

    Re: Power Query - want to add formulas to query output

    Great. I will have a play myself later. Lucky find!

  11. #11
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2505 (Windows 11 Home 24H2 64-bit)
    Posts
    91,265

    Re: Power Query - want to add formulas to query output

    Just had a play and discovered that this is the default setting in my Office 365 subscription. It's a while since I tried it, so it's become the default since then. Happy days!

+ 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. Replies: 0
    Last Post: 07-03-2018, 05:33 PM
  2. Sub-Forum for Excel Power Tools (Power Query, Power Pivot & Power BI)
    By chullan88 in forum Suggestions for Improvement
    Replies: 10
    Last Post: 06-28-2018, 02:25 PM
  3. New to Power Query Need to refence a cell for SQL query
    By BSWhipp in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 05-10-2018, 09:00 AM
  4. Replies: 0
    Last Post: 04-05-2018, 01:16 AM
  5. error in power query & power pivot
    By Baldev Kumar in forum Excel Charting & Pivots
    Replies: 8
    Last Post: 01-03-2018, 01:34 AM
  6. Power Query, Native Query Paramter
    By Kyle123 in forum Excel General
    Replies: 0
    Last Post: 12-08-2017, 09:29 AM
  7. MS Query to Power Query
    By PhilipJPSmith in forum Office 365
    Replies: 1
    Last Post: 09-06-2017, 10:39 AM

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