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

Customized sorting by Calculated Dimension

Hello everyone,

I have created the calculated dimension attribute(like below script) in my pivot table and i want sort the column by ascending exclude 'others ' as i want show the 'others' in the last row.

=if([CAT]='Mobiles & Tablets', 'Mobiles & Tablets',

if([CAT]='Computers & Laptops', 'Computers & Laptops',

if([CAT]='Consumer Electronics', 'Consumer Electronics',

if([CAT]= 'Cameras', 'Cameras',

if([CAT]='Watches', 'Watches',

if([CAT]='Health & Beauty', 'Health & Beauty',

'Others'))))))

Label name is : Category

I tired below script in the sort tab expression but it doesn't work :

WildMatch(Category,'Cameras',Computers & Laptops','Consumer Electronics','Health & Beauty','Mobiles & Tablets','Others')

or

Match(Category,'Cameras',Computers & Laptops','Consumer Electronics','Health & Beauty','Mobiles & Tablets','Others')

could you please advise me ?

Best,

Robert

1 Solution

Accepted Solutions
MarcoWedel

Hi,


you could try this sorting expression:


If(

Match([CAT],'Cameras','Computers & Laptops','Consumer Electronics','Health & Beauty','Mobiles & Tablets'),

Match([CAT],'Cameras','Computers & Laptops','Consumer Electronics','Health & Beauty','Mobiles & Tablets'),

100)



hope this helps


regards


Marco

View solution in original post

3 Replies
MarcoWedel

Hi,


you could try this sorting expression:


If(

Match([CAT],'Cameras','Computers & Laptops','Consumer Electronics','Health & Beauty','Mobiles & Tablets'),

Match([CAT],'Cameras','Computers & Laptops','Consumer Electronics','Health & Beauty','Mobiles & Tablets'),

100)



hope this helps


regards


Marco

MarcoWedel

or

Match([CAT],'Mobiles & Tablets','Health & Beauty','Consumer Electronics','Computers & Laptops','Cameras')


in descending order


hope this helps


regards


Marco

Not applicable
Author

Many Thanks Mr. Marco wedel.

Have a nice day!