locked
Sort order for imported data RRS feed

  • Question

  • Hi,

    I have a problem that I would like to solve with PowerPivot where I need the imported data to be sorted in a certain way. The data recides in an Oracle db and is to be sorted on two columns. I figured I would get the data sorted like I want in Powerpivot if I use ORDER BY in the SQL statement that is used for getting the data. When trying the SQL statement in Oracle SQL developer the data is nicely sorted like I want. However, when the same statement is used in PowerPivot the data is displayed in a completely different way with no sign of any sorting at all. I played around a bit with other sorting statements and it seems like it is not sorting at all. Can someone please explain how I can get the data sorted like I want in powerpivot?

    I do not have a SQL server that I could try this on to see if it is something Oracle specific.

    Best regards
    Staffan

    Tuesday, July 13, 2010 11:15 PM

Answers

  • Are you trying to issue a PLSQL statement to load the data into the PowerPivot Window? What does the statement look like in the ORDER BY clause?


    You can sort the data once it is in PowerPivot, but this really is not going to matter because that is not how it is going to be used in the PivotTable or PivotChart
    once you actually leverage the data. I guess I am confused as to what you are wanting to do with the data.


    Dan English's BI Blog
    Wednesday, July 14, 2010 1:53 AM

All replies

  • Are you trying to issue a PLSQL statement to load the data into the PowerPivot Window? What does the statement look like in the ORDER BY clause?


    You can sort the data once it is in PowerPivot, but this really is not going to matter because that is not how it is going to be used in the PivotTable or PivotChart
    once you actually leverage the data. I guess I am confused as to what you are wanting to do with the data.


    Dan English's BI Blog
    Wednesday, July 14, 2010 1:53 AM
  • Yes, since I need to import a date from Oracle db I need to do it through SQL. The SQL statement looks like this:

    SELECT
       object,
       TO_CHAR(systime, 'DD/MM/YYYY HH24:MI:SS'),
       value
    FROM
       TimeSeriesData
    ORDER BY
       object, systime

    Since the statement works perfectly in Oracle SQL developer I guess PowerPivot handles the data differently in some way. I want the data sorted in order to use the EARLIER function to compare values between subsequent systimes (at least that's how I understand the EARLIER function).

    Wednesday, July 14, 2010 8:53 PM
  • Staff,

    Is this still an issue?

    Thank you!


    Ed Price, SQL Server Customer Program Manager (Blog, Small Basic, Wiki Ninjas, Wiki)

    Answer an interesting question? Create a wiki article about it!

    Monday, November 4, 2013 12:20 AM
  • I have the same issue - trying to sort the data on import into PowerPivot (Excel 2013) does not work.  I am imporitng from a SQL Server 2012 server, using a similar simple statement "Select X From Y Order by x1, x2  and the order is not present in the resulting table. So - it is not Oracle specific.  

    Regards,

    Eric.

     
    Wednesday, November 20, 2013 6:46 PM
  • Sometimes you just want to "walk the data", and PowerPivot only lets you sort by one column at a time - so while you can sort orders by date (for example) or orders by customer, you can's setup the data to look at orders by customer by date
    Wednesday, November 20, 2013 6:52 PM