+ Reply to Thread
Results 1 to 6 of 6

POwer query resorting row position in final output

  1. #1
    Registered User
    Join Date
    05-20-2020
    Location
    UK
    MS-Off Ver
    Office 16
    Posts
    33

    POwer query resorting row position in final output

    I have a query which looks at a excel spreadsheet A which is updated daily with new lines of data. The query in another workbook B looks through that data and pull in any new rows. It removes a couple of columns and filters for jurisdiction UK. Yesterday B at 84 rows. Today another UK item was added to A. When I go into the query editor this now shows as row 85 - where I'd expect it. Yet in B where the results show its inserted itself into row 67. This is critical as outside of the table I have formula based on what is inside the table on that row. Any ideas why this would do this? Why the query editor ifno should be different to the final output?
    Last edited by Bazbuyer; 10-07-2020 at 09:44 AM. Reason: to make clearer

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

    Re: POwer query mixing row position in final output

    There are instructions at the top of the page explaining how to attach your sample workbook.
    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.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    05-20-2020
    Location
    UK
    MS-Off Ver
    Office 16
    Posts
    33

    Re: POwer query mixing row position in final output

    thanks, unfortunately I cant attach the workbooks as I'm doing this from work and firewalls, protocols etc prevent me from doing so. However, I'm not sure how much it would help. When I view in the editor or close and load in the query screen/preview the new data is at row 85. When I go into the specific worksheet in the workbook at loads/inserts to row 65 (which is row 67 on the page), rather than row 85 as you would expect

  4. #4
    Valued Forum Contributor
    Join Date
    04-27-2015
    Location
    Abu Dhabi, U.A.E
    MS-Off Ver
    Office 365 | 2016
    Posts
    696

    Re: POwer query mixing row position in final output

    Remove the step Sorted Rows

  5. #5
    Registered User
    Join Date
    05-20-2020
    Location
    UK
    MS-Off Ver
    Office 16
    Posts
    33

    Re: POwer query mixing row position in final output

    thanks but there isn't a sorted row step. I've just looked at the connections properties (all refresh is disabled - the refresh is called by a macro on opening this workbook) Connections("Query - Central to Raw Upload").Refresh
    Looking at the properties I have in data formatting and layout adjust column width and preserve cell formatting ticked (should I have preserve column sort/filter/layout ticked?) also ticked is 'insert cells for new data, delete unused cells', should I have insert entire rows for new data, clear unused cells'?.

  6. #6
    Registered User
    Join Date
    05-20-2020
    Location
    UK
    MS-Off Ver
    Office 16
    Posts
    33

    Re: POwer query resorting row position in final output

    I've soled this by adding an index at the end of the query then when the results are output to the worksheet running a sort on the index column. From what I could find on the web this may relate to some sort of memory optimization that group certain records that are similar, though I couldnt see the similarity myself

+ 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: 2
    Last Post: 09-12-2020, 11:34 AM
  2. Replies: 4
    Last Post: 02-17-2020, 06:03 AM
  3. [SOLVED] filter by criteria pivot table or Power Query before output
    By nigelog in forum Excel Charting & Pivots
    Replies: 14
    Last Post: 07-30-2019, 09:28 AM
  4. Hyperlink In Power Query Output
    By kersplash in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 02-20-2019, 04:41 AM
  5. Power Query - Dates not sorting in output
    By kersplash in forum Excel General
    Replies: 13
    Last Post: 11-16-2018, 02:55 AM
  6. [SOLVED] Power Query - want to add formulas to query output
    By kersplash in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 07-19-2018, 06:16 AM
  7. 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

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