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

Announcements
Only at Qlik Connect! Guest keynote Jesse Cole shares his secrets for daring to be different. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Match sort not working

Hello.

I used the following expression under Sort section: Match(cpt4_code_id, '99201', '99202' , '99203', '99204', '99205')

Works great:

150c8aaefb0d486192b43052ad8f25f0.jpg

However, when I select a filter for a specific provider name, the sort no longer works.

76bbdba35edc4816894cb3b79f5ad754.jpg

Measure 1:

Count({$<cpt4_code_id={'99201','99202','99203','99204','99205'}>}cpt4_code_id)/Count(total{$<cpt4_code_id={'99201','99202','99203','99204','99205'}>}quantity)

Measure 2:

Count({1<cpt4_code_id={'99201','99202','99203','99204','99205'}>}cpt4_code_id)/Count(total{1<cpt4_code_id={'99201','99202','99203','99204','99205'}>}quantity)

How come the order doesn't follow what is in the expression?

Match(cpt4_code_id, '99201', '99202' , '99203', '99204', '99205')


1 Solution

Accepted Solutions
sunny_talwar

Try this:

Match(Only({1} cpt4_code_id), '99201', '99202' , '99203', '99204', '99205')

View solution in original post

6 Replies
sunny_talwar

Try this:

Match(Only({1} cpt4_code_id), '99201', '99202' , '99203', '99204', '99205')

Not applicable
Author

That worked! How come I needed to apply Only?

Thanks Sunny!

sunny_talwar

Because based on the selection made the cpt4_code_id was converting to null for not selected items. In order to restrict selections we needed to add {1} and this can only be added within a aggregation function such as Only().

Not applicable
Author

Thank you!!!  I just tried that with a sort order I've been struggling with.  Awesome

irfanmd2010
Contributor
Contributor

Thank you , I also had same issue

emroenor
Contributor
Contributor

Hi, the {1} is not working for me. I used this Expression but the graph is not displaying in the right order.

Match(Only({1} [3M Next Milestone]),'Pre Imp: Quote Request', 'Pre Imp: TRR', 'Pre Imp: Site Survey','Pre Imp: HLD + BOM','Pre Imp: SOW/Proposal & PO', 'MS1: Project Kick-off', 'MS2: Eng Design + LLD/Workpack', 'MS3: Equipment Ordering', 'MS4: Equipment Delivery', 'MS5: Site Remediation', 'MS6: Implementation Preparation', 'MS7: Implementation', 'MS8: ORT/NOC Handover', 'MS9: Project Closeout') 

Can you help me on this? Thanks.