+ Reply to Thread
Results 1 to 5 of 5

Power query changes line order

  1. #1
    Forum Contributor
    Join Date
    09-13-2010
    Location
    Poland
    MS-Off Ver
    365
    Posts
    204

    Power query changes line order

    Hi

    Hi do you keep the same line / row order when make power query from table. In my example, simple take fro table and delete few rows, changes the order for some reason and i need to keep it as it is.

    Do you know how to solve it?

  2. #2
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: Power query changes line order

    Haven't seen that behavior, but...try this:
    Add an Index column before transforming the data.
    Then sort the rows back into original order.

    Does that help?
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

  3. #3
    Forum Contributor
    Join Date
    09-13-2010
    Location
    Poland
    MS-Off Ver
    365
    Posts
    204

    Re: Power query changes line order

    hi,

    it helped. I had to make another query, after the first one - if I keep it in one query code, it slows down calculation significantly, up to 20 min.

  4. #4
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,940

    Re: Power query changes line order

    Welcome to the forum

    Please attach a sample workbook (not a picture or pasted copy). Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  5. #5
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: Power query changes line order

    One more thing just occurred to me.
    Whenever a Power Query step seems to have mind of its own, I put a Table.Buffer step just before the problem step.
    Example:
    BufferData = Table.Buffer(prev_step_name)

    That usually fixes it.

    Does that help?

+ 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] Power Query - how to keep order of the source table
    By afgi in forum Excel Charting & Pivots
    Replies: 9
    Last Post: 02-26-2020, 02:59 AM
  2. [SOLVED] Power Query - excel formula translation into Power Query
    By afgi in forum Excel Charting & Pivots
    Replies: 7
    Last Post: 02-19-2020, 03:38 AM
  3. Replies: 4
    Last Post: 02-17-2020, 06:03 AM
  4. Power Query Refresh Order
    By Steveapa in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-20-2019, 11:02 PM
  5. 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
  6. [SOLVED] Power Query - Find and Replace Line Breaks
    By ibuhary in forum Excel General
    Replies: 4
    Last Post: 03-27-2018, 05:33 AM
  7. Replies: 10
    Last Post: 09-27-2012, 03:59 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