Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
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

Re: Customized sorting by Calculated Dimension

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

3 Replies

Re: Customized sorting by Calculated Dimension

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

Re: Customized sorting by Calculated Dimension

or

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


in descending order


hope this helps


regards


Marco

Not applicable

Re: Customized sorting by Calculated Dimension

Many Thanks Mr. Marco wedel.

Have a nice day!

Community Browser