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

sorting

Hello,

I have 2 dimensions

Dim1 has data as fld A, fld B

Dim2 has data as fld1, fld2, fld3

fldA -> fld1, fld2

fldB -> fld3, fld1, fld2

Now here I have the problem in order of data displayed in Dim2

currently under fldB it showing in sequence ->fld1, fld2, fld3 (see image1)

But I want the order of dim2 under fldB as fld3, fld1, fld2 (see image2)

Please guide on this.

1 Solution

Accepted Solutions
Not applicable
Author

Hi Apurva,

I would suggest create a new column in your table where Dim2 is present, which contains the sorting order. You can create it using Qlikview script or you can load it through db or excel sheet where you specify the sorting order for Dim2.

You need to find a way to provide a correct numbering so that fld3 has number 1, fld1 has number 2, fld2 has number 3 is given.

then you can use this column in your sorting tab to sort the dimension.

Hope this help.

Regards,

Anosh

View solution in original post

9 Replies
sivarajs
Specialist II
Specialist II

Sort tab--> check the Dim2 expression--> give Right(Dim2,1)-->sort asc or desc

Not applicable
Author

Sivaraj,

It is not working.

Not applicable
Author

Hi Apurva,

You can try this : Sort tab -> Load Order

You can Load the fields in this order : fld3, fld1, fld2 in the script.

Thanks,

Angad

Not applicable
Author

Hi Itsangad,

I tried this option but by writing an inline script for small list and it is working.

But for this Dimension, the list is too long, then I dont think it is feasible to write inline script for long list of dimension.

what do you suggest?

Not applicable
Author

Hi Apurva,

I would suggest create a new column in your table where Dim2 is present, which contains the sorting order. You can create it using Qlikview script or you can load it through db or excel sheet where you specify the sorting order for Dim2.

You need to find a way to provide a correct numbering so that fld3 has number 1, fld1 has number 2, fld2 has number 3 is given.

then you can use this column in your sorting tab to sort the dimension.

Hope this help.

Regards,

Anosh

Not applicable
Author

Hi,

Have a look on this discussion.

http://community.qlik.com/thread/73641

Not applicable
Author

Hi,

Use the sort by expression : = Match(dim2, fld3, fld1, fld2).

khadeer
Specialist
Specialist

Hi,

Please check the attached file ... Sort....Expression and use match function. You can use as per your requiremnt.

Hope it helps u.

Not applicable
Author

Thank you every one for your solutions.

I tried all the solutions and all are working.

Thank you once again to all.