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: 
Anonymous
Not applicable

Sort Data

Hi, i Have a question about sorting data shown in pivot table.

I have data like this:

Color          No.

Red            1

Blue            2

Green         3

The data sorted by Color name (alphabet) by default, now i want to sort the data by "No." field.

Do you have any idea ?

Thanks in advance.

8 Replies
tamilarasu
Champion
Champion

A pivot table is always sorted first after the first dimension, then the second dimension, like wise.

Capture.PNG

Promote your Number dimension above the color dimension.

jagan
Luminary Alumni
Luminary Alumni

Hi,

Try like this

LOAD

Dual(ColorName, Match(ColorName, 'Red', 'Blue', 'Green')) AS ColorName,

'

'

'


FROM DataSource;

Now in Sort tab select Numeric Value

Hope this helps you.

Regards,

jagan.

Not applicable
Author

go to the sort tab promote the number dimension or demote the color dimension.then select Number dimesion and in right panel select the checkbox numeric asscending

HirisH_V7
Master
Master

Hi ,

If you want the Same sort as you loaded means you can go with Load Order in Pivot Table Sort for each dimension.

Else ,

You can write like this in your sort expression for Color,

=IF(PIck(Match(No,'1','2','3'),'1','2','3'),No)

Hope this Helps,

Hirish

HirisH
“Aspire to Inspire before we Expire!”
saniyask
Creator
Creator

Hi,

As per your question u want the data to be sorted according to the 'No.' field..

you can simply go to chart properties ->Sort->in the dimension column just removing all sort of sorting that is pre applied and click on No. field and sort it the way u want it i.e ascending or descending..

Hope that will help you !!

Thanks & Regards,

Saniya

Not applicable
Author

No. field should be the first field in the Pivot table.

engishfaque
Specialist III
Specialist III

Dear Lejours88,

Kindly find attached App, I hope you are looking for that one.

Kind regards,

Ishfaque Ahmed

Not applicable
Author

HI Lejours,

Please find the attachment . I think it will help to proceed further .