Oracle Analytics Cloud and Server

Welcome to the Oracle Analytics Community: Please complete your User Profile and upload your Profile Picture

Custom order of columns in Pivot

Received Response
81
Views
6
Comments

Summary

Custom order of columns in Pivot

Content

Hi,

Is it possible to modify (customize) the order in which columns in a Pivot are displayed?

I know we can do it A-Z or Z-A but for example I have 3 columns: Overtime, Standby & Urgent

I would like to order the columns:

Standby | Urgent | Overtime

 

Any pointers very welcomed!

Regards,

Pawel.

Answers

  • Luke Sharma
    Luke Sharma Rank 4 - Community Specialist

    Hi Pawel - as far as I understand it, if you change the order of the columns in the data elements tab, it should change the order of the columns in the pivot. Please let me know if I've misunderstood your question though   e.g.

    imagevs image

  • Luke Sharma
    Luke Sharma Rank 4 - Community Specialist

    Hi Pawel, thanks for replying.

    I see what you mean now - and agree that this is a function that should be available, but I can't see this function at the moment.

    However a consolatory fix could be this:

    Create the following calculation

    CASE WHEN Task Category= 'Standby' THEN 1 ELSE (CASE WHEN Task Category= 'Urgent' THEN 2 ELSE 3 END) END

    or if there are more than 3 Task Categories

    CASE WHEN Task Category= 'Standby' THEN 1 ELSE (CASE WHEN Task Category= 'Urgent' THEN 2 ELSE  (CASE WHEN Task Category= 'Overtime' THEN 3 ELSE NULL END) END) END

    Adding this new calculation as a column, and then sorting by this calculation A-Z.

    I know this isn't *exactly* how you would have wanted to go about this, but it is a way that would work!

  • Pawel X Dmochowski
    Pawel X Dmochowski Rank 4 - Community Specialist

    Hi,

    Not exactly The issues is that I have only one column named: Task Category. Then, I have different values for it.... e.g. Standby, Overtime, Urgent, etc. So, what I'm looking for is how to sort the data in that column:

    Capture1.PNGCapture2.PNG

    What I would like is to have Standby | Urgent | Overtime

    Regards,

    Pawel.

  • Pawel X Dmochowski
    Pawel X Dmochowski Rank 4 - Community Specialist

    Nice idea!

    When You mean to add it as a new column You mean during the Data Flow process right?

    Agreed, definitely not a final solution but I'll test it. Thanks.

  • Luke Sharma
    Luke Sharma Rank 4 - Community Specialist

    Great, let me know how it goes! I think it should work, but if not please let me know and i'll try to think of something else!

  • Pathak Sonkar
    Pathak Sonkar Rank 3 - Community Apprentice

    Nice Solution LSharm, but in this case, do we have to pull the second calculated column as well in the view?

    What I meant is can we hide this calculated column or something? I do not want to pull this in my report or graph.