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

Announcements
Note: You may notice some temporary visual or styling issues in the Community. Our vendor is actively investigating.
cancel
Showing results for 
Search instead for 
Did you mean: 
manojkulkarni
Partner - Specialist II
Partner - Specialist II

Top 3 Reason Types

Hi Friends

Below is the table having case ID & Reason Type. We would require to calculate number occurrences of each reason type and show top 3 reasons as expected in the second table provided below.

Any suggestion or help is appreciated

Table1:

  

CaseIDReason
449790Q: Identify Payee
453917Q: Vendor Refund
456423Q: Identify Payee
456427Q: Identify Payee
455388Q: Identify Payee
455386Q: Identify Payee
455361Q: Advise on Allocation of Receipt
456900Q: NonTenant check
453845Q: Advise on Allocation of Receipt
456757Q: Advise on Allocation of Receipt
456759Q: Advise on Allocation of Receipt
456804Q: Advise on Allocation of Receipt
456814Q: Advise on Allocation of Receipt
456806Q: Identify Payee
445595Q: Advise on Allocation of Receipt
456783Q: Advise on Allocation of Receipt
446283Q: NonTenant check
453759Q: Advise on Allocation of Receipt
455411Q: Advise on Allocation of Receipt
456811Q: Advise on Allocation of Receipt
456819Q: Advise on Allocation of Receipt

Table2:

ReasonOccurance
Q: Advise on Allocation of ReceiptHigh
Q: Identify PayeeMedium
Q: NonTenant checkLow
8 Replies
sunny_talwar

Like this

Capture.PNG

manojkulkarni
Partner - Specialist II
Partner - Specialist II
Author

Thanks for your immediate response. This is working.

What we are expecting here is , Occurrence will be my Label Heading & Highest count of cases of a reason should be displayed based on data in Text Object

tresesco
MVP
MVP

Like this?

Capture.PNG

manojkulkarni
Partner - Specialist II
Partner - Specialist II
Author

Thanks Tresesco for solution. How we should handle when we have same count for 2 different reason ?

example:

Table:

LOAD * INLINE [

    CaseID, Reason

    449790, Q: Identify Payee

    453917, Q: Identify Payee

    456423, Q: Identify Payee

    456427, Q: Identify Payee

    455388, Q: Identify Payee

    455386, Q: Identify Payee

    456900, Q: NonTenant check

    453845, Q: Advise on Allocation of Receipt

    456757, Q: Advise on Allocation of Receipt

    456759, Q: Advise on Allocation of Receipt

    456804, Q: Advise on Allocation of Receipt

    456814, Q: Advise on Allocation of Receipt

    456806, Q: Identify Payee

    445595, Q: Advise on Allocation of Receipt

    456783, Q: Advise on Allocation of Receipt

    446283, Q: NonTenant check

];

sunny_talwar

What would be the expected output? See both?

sunny_talwar

Something like attached

sakthi266
Contributor III
Contributor III

Hi Sunny Talwar,

       Expected Result is Like this

High : Q: Advise on Allocation of Receipt

Medium : Q: Identify Payee

Low   : Q: NonTenant check


Because , Q: Advise on Allocation of Receipt and Q: Identify Payee are 7 , By Alphabet It should show like this.

File Attached is showing given below

High : Q: Advise on Allocation of Receipt

Medium : Q: NonTenant check

Low : Null

sunny_talwar

Check attached