Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

I can help you understand the function sort-weight

table 1

Record      ID

1                A

2                B

3                C

4                D

Table 2:

IDRelacion (ID)      Field           Sort-weight

1                             AAA                4

1                             BBB                3

1                            CCC                 2

1                            DDD                1

Code in script:

IDRelacion & '' & Country as Field1

I use this expression in a pivot table.:

= ID & chr (10) & Registration & chr (10) & concant (Field1, chr (10), Sort-weight)

I have trouble using the Sort-weigth expression.

Since my data would thus be:

1  A

1  AAA

1  BBB

1  CCC

1  DDD

but I want my Sort-Weight function are as follows:

1 A

1 DDD

1 CCC

1 BBB

1 AAA

I do not understand how to use the Sort-Weigth function to fit me well.

5 Replies
swuehl
MVP
MVP

The Help says:

"Sort-weight should return a numeric value where the lowest value will render the item to be sorted first."

So I think you just need to revert the sort weight distribution.

Not applicable
Author

But it would have to create a field in descending order, and where does the sort-weitght, put that field so I put it in that order?

swuehl
MVP
MVP

Sorry, I think I don't fully understand.

There is a sort tab in chart properties where you can e.g. input your weight in sort expression field.

But sorting pivot dimensions might not result in what you want, because 2nd, 3rd, 4th. dimension is not sorted per sub segment.

Not applicable
Author

then could not create what I am stating in my comment?

swuehl
MVP
MVP

Sorry, I think I haven't fully got your comment. Could you post a small sample app together with your expected outcome?