Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
neha_shirsath
Specialist
Specialist

Sorting In Pivot Table

Hello Community,

I have pivot table like-

Month-Year OCT-13 SEP-13 AUG-13 NOV-13 DEC-13 NOV-15
Organisation Code Amount Remaining Amount Original Amount  Remaining Amount Original Amount Remaining Amount Original Amount  Remaining Amount  Original Amount  Remaining Amount  Original Amount  Remaining Amount  Original
AUSD2556255676617661--------
BVSD1162251162258929138929161381321389322003620036----
CMS22085220856001360013226082260868136813----
DTS------------

I want the sorting on Month-Year field like

SEP,OCT,NOV,DEC...etc.

Like this-

Month-Year AUG-13 SEP-13 OCt-13 NOV-13 DEC-13 NOV-15
Organisation Code Amount Remaining Amount Original Amount  Remaining Amount Original Amount Remaining Amount Original Amount  Remaining Amount  Original Amount  Remaining Amount  Original Amount  Remaining Amount  Original
AUSD2556255676617661--------
BVSD1162251162258929138929161381321389322003620036----
CMS22085220856001360013226082260868136813----
DTS------------

-Thanks & Regards,

Neha

9 Replies
Not applicable

use sort number and sort on date

or make in the script year&num(Month,'00')

sujeetsingh
Master III
Master III

Select sorting by expression default

cesaraccardi
Specialist
Specialist

Hi Neha,

In order to do that you need to "tell" QlikView that these values should be interpreted as Dates (numbers). I suggest you to do the following:

1. Change the variable MonthNames in your script to UPPER CASE values:

SET MonthNames='JAN;FEB;MAR;APR;MAY;JUN;JUL;AUG;SEP;OCT;NOV;DEC';

2. When loading the field Month-Year use this syntax:

LOAD

     (...),

     Date#(Month-Year,'MMM-YY') as Month-Year

FROM

TABLE;

3. Change the table to sort the field numerically.

Regards,

Cesar

neha_shirsath
Specialist
Specialist
Author

Hi Sujeet,

Thanks for quick reply but it's not working with expression default.

neha_shirsath
Specialist
Specialist
Author

Hello Cesar,

Not working yet ...

sujeetsingh
Master III
Master III

If possible can you please give a sample .

sandeepprasad_j
Creator
Creator

Hi Neha ,

In Sort tab Select Load Order as 'Reversed'

Hope this helps

Thanks,

Sandeep.

cesaraccardi
Specialist
Specialist

Hi Neha,

It should work, also make sure you have only one criteria selected.

Cesar

cesaraccardi
Specialist
Specialist

Hi Neha,

Please have a look at the attachment.

Kind Regards,

Cesar