Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

paulyeo11
Valued Contributor II

How to sort my Table in sequencs ?

Hi All


My Table 2 dimension is period by month , now i not sort in sequences.


Table 1 and Table 3 is list box , it work fine.


Can some one advise me.



Paul Yeo

1 Solution

Accepted Solutions

Re: How to sort my Table in sequencs ?

May be this as expression?

Aggr(SUM(C_ONHAND_AMT), (Duration1, (NUMERIC, ASCENDING)))

OR, You can try in script level using Dual() like Nested IF Statements

10 Replies
paulyeo11
Valued Contributor II

Re: How to sort my Table in sequencs ?

my QVW

Re: How to sort my Table in sequencs ?

May be this as expression?

Aggr(SUM(C_ONHAND_AMT), (Duration1, (NUMERIC, ASCENDING)))

OR, You can try in script level using Dual() like Nested IF Statements

paulyeo11
Valued Contributor II

Re: How to sort my Table in sequencs ?

Hi Anil

Thank you for your sharing.

I try to put the expression at Table 2 dimension  :-

Aggr(SUM(C_ONHAND_AMT), (Duration1, (NUMERIC, ASCENDING)))

it does not display any thing , where i go wrong ?

Paul Yeo

Re: How to sort my Table in sequencs ?

This should be an Expression

And, Note - It will work when you have more thatn QV12 versions only. Are you using same?

uacg0009
Valued Contributor

Re: How to sort my Table in sequencs ?

Hi,

If your values in Duration1 are all fixed, how about create a table for sorted in script, then use it to sorted your table?

Sorry I have a question, I found that in your example, when I select in list box,the color is not the default green. Could you please tell me how to change that?

Thanks.

Aiolos

paulyeo11
Valued Contributor II

Re: How to sort my Table in sequencs ?

Hi Aiolos

Pls go to list box , right click proprity , then go to Tab = Caption , then click on Active caption and change the back ground color.

Paul Yeo

paulyeo11
Valued Contributor II

Re: How to sort my Table in sequencs ?

Hi Anil

I have tested your expression , it work fine on Qlik Sense. since you are so good , i like to ask you how to make the Row 1 >60 Mth move to below , display at row "58-60 Mth" .

Below is the sequences generate by QS , which is not correct :-

 

Duration1Aggr(SUM(C_ONHAND_AMT), (Duration1, (NUMERIC, ASCENDING)))
>60 Mth7,936.15
1-3 Mth640,854.17
4-6 Mth135,897.58
7-9 Mth71,247.18
10-12 Mth116,366.76
13-15 Mth34,175.59
16-18 Mth44,734.08
19-21 Mth19,946.77
22-24 Mth14,189.18
25-27 Mth11,370.80
28-30 Mth28,694.83
31-33 Mth23,748.01
34-36 Mth15,806.44
37-39 Mth14,801.39
40-42 Mth17,634.22
43-45 Mth12,573.30
46-48 Mth8,546.26
49-51 Mth9,854.55
52-54 Mth5,042.12
55-57 Mth11,798.88
58-60 Mth5,002.79
Fast Moving215,512.14

Re: How to sort my Table in sequencs ?

First of all, You mark yourself only not the correct one.

And, To solve that you must need Dual() function to each ..

uacg0009
Valued Contributor

Re: How to sort my Table in sequencs ?

Hi Yeo,

Thanks to reply, well, actually I know that the active caption color, maybe I didn't clarify what I want to ask.

I didn't mean the caption of list box, I see that when I select the value of the list box, the color is not default green.

How to sort my Table in sequencs.PNG

I just want to know how to make that?

Thanks.

Aiolos

Community Browser