Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
pawwy1415
Creator III
Creator III

Sorting expression

Hi,

I have below expression used in dimension and I want to do sorting

= pick(match(MetricID,27,31,394,398,222,224,360,364,368,372,1141,1143,154,156,160,162,213,215,380,382)

     ,'PBT','Provisions','PBT','Provisions','Income','Income','Costs','Costs','Costs','Costs','PAT','PAT',

     'Total RWAs','Total RWAs','Total RWAs','Total RWAs','Total RWAs','Total RWAs','Total RWAs','Total RWAs')

sorting should be like

Income

Costs

Provisions

PBT

PAT

RWA

I used below expression in sorting..

= pick(match(MetricID,222,224,360,364,368,372,31,398,27,394,1141,1143,154,156,160,162,213,215,380,382)

     ,1,1,2,2,2,2,3,3,4,4,5,5,

     6,6,6,6,6,6,6,6)

but it doesn't work.. it's come in below order

Total RWAs

Costs

income

Provisions

PBT

PAT

Could you please see if I am doing something wrong in sorting?

23 Replies
pawwy1415
Creator III
Creator III
Author

This is in qlik sense

sunny_talwar

What if you just use this

Match(Only({1} MetricID), 222,224,360,364,368,372,31,398,27,394,1141,1143,154,156,160,162,213,215,380,382)

effinty2112
Master
Master

Hi,

Try this as your sort expression:

Match(

pick(match(MetricID,27,31,394,398,222,224,360,364,368,372,1141,1143,154,156,160,162,213,215,380,382)

     ,'PBT','Provisions','PBT','Provisions','Income','Income','Costs','Costs','Costs','Costs','PAT','PAT',

     'Total RWAs','Total RWAs','Total RWAs','Total RWAs','Total RWAs','Total RWAs','Total RWAs','Total RWAs')

,'*Income*','*Costs*','*Provisions*','*PBT*','*PAT*','*RWA*')

Good luck

Andrew

Anil_Babu_Samineni

Try this?

Match(MetricID, 'Total RWAs', 'Costs', 'income', 'Provisions', 'PBT', 'PAT')

Capture.PNG

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
pawwy1415
Creator III
Creator III
Author

Hi all,

tried all but none of them working

effinty2112
Master
Master

Hi,

I had a typo, try:

WildMatch(

pick(match(MetricID,27,31,394,398,222,224,360,364,368,372,1141,1143,154,156,160,162,213,215,380,382)

     ,'PBT','Provisions','PBT','Provisions','Income','Income','Costs','Costs','Costs','Costs','PAT','PAT',

     'Total RWAs','Total RWAs','Total RWAs','Total RWAs','Total RWAs','Total RWAs','Total RWAs','Total RWAs')

,'*Income*','*Costs*','*Provisions*','*PBT*','*PAT*','*RWA*')

pawwy1415
Creator III
Creator III
Author

Capture.PNG

it's coming in this order now..still not working

sunny_talwar

May be give this a short

=Match(

Pick(

Match(Only({1} MetricID),27,31,394,398,222,224,360,364,368,372,1141,1143,154,156,160,162,213,215,380,382),

'PBT', 'Provisions', 'PBT', 'Provisions', 'Income', 'Income', 'Costs', 'Costs', 'Costs', 'Costs', 'PAT', 'PAT', 'Total RWAs', 'Total RWAs', 'Total RWAs', 'Total RWAs', 'Total RWAs', 'Total RWAs', 'Total RWAs', 'Total RWAs'),

'Total RWAs', 'Costs', 'Income', 'Provisions', 'PBT', 'PAT')

pawwy1415
Creator III
Creator III
Author

Capture.PNG

it's coming this one..