Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set order of rows in dimension

Hi,

I have dimension which has few rows which I want to show only on the end of list. I use ListBox to show this dimension and in its Expression Sort I use sth like this:

if([Produkt] = 'BRAK',Count ([Produkt])+1,

    if([Produkt] = 'Brak',Count ([Produkt])+2,

        if([Produkt] = 'Niewykorzystany',Count ([Produkt])+3)))

And this expression allows me to show this special rows on the end. But when I select any other row, the sort of rows is changing and I don't know why and how to prevent this action.

The options which I use in sort are:

-State,

-Expression,

-Text.

I've also noticed that when I uncheck Text option, my rule works, but then order is not alphabetical.

Any hints will be very appreciated.

Monika

1 Solution

Accepted Solutions
maxgro
MVP
MVP

if I understand

=-wildmatch(only({1} Produkt), 'Niewykorzystany', 'BRAK', 'Brak', '*')

1.png

View solution in original post

3 Replies
maxgro
MVP
MVP

if I understand

=-wildmatch(only({1} Produkt), 'Niewykorzystany', 'BRAK', 'Brak', '*')

1.png

Not applicable
Author

Hey, it works*! Thanks.

Please tell me one more thing. How does work this wildmatch?

*almost - I had to replace

=-wildmatch

with

(-1)*wildmatch

maxgro
MVP
MVP

from Qlik help

wildmatch( str, expr1 [ , expr2,...exprN ] )

The wildmatch function performs a case insensitive comparison and permits the use of wildcard characters ( * and ?) in the comparison strings.

Example:

wildmatch( M, 'ja*','fe?','mar')

returns 1 if M = January

returns 2 if M = fex



It should works in the same way if you drop the minus and sort the expression descending