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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out 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

Labels (1)
1 Solution

Accepted Solutions
MarcoWedel
MVP
MVP

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
MVP
MVP

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
MVP
MVP

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!