Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Highlighted
tmumaw
Valued Contributor

Ranking in Pivot table showing only TOP x Job Codes

Hi all,

I am trying to show the top 5 or 10 job codes across 5 years.  Sort of having a problem getting it to work.  Any ideas?  For example I need to show the Top 5 Job Codes for each year.  Here is my Rank statement:  Rank(count({<InActive = {1},YTDFlag = {1}>} DISTINCT([Employee Number])))

And I sort based on Job with this : descending on this count({<InActive = {1},YTDFlag = {1}>} DISTINCT([Employee Number]))

Thanks

Tags (1)
1 Solution

Accepted Solutions
YoussefBelloum
Esteemed Contributor

Re: Ranking in Pivot table showing only TOP x Job Codes

would you be able to attach a sample with the original file structure ? because with a pivot structure I'll need to do a crosstable and I'm not sure I will get your original structure

8 Replies
YoussefBelloum
Esteemed Contributor

Re: Ranking in Pivot table showing only TOP x Job Codes

Hi,

so what is the expected output here ? would you be able to surround the lines using the image above ?

tmumaw
Valued Contributor

Re: Ranking in Pivot table showing only TOP x Job Codes

I would like to see the Top 5 jobs for each year based on Term Emps.  Ignore the rank for right now.

YoussefBelloum
Esteemed Contributor

Re: Ranking in Pivot table showing only TOP x Job Codes

ok, just share your data structure and I'll try to populate a table with the same structure and share a QVW

tmumaw
Valued Contributor

Re: Ranking in Pivot table showing only TOP x Job Codes

Forgot to add the spreadsheet thanks

YoussefBelloum
Esteemed Contributor

Re: Ranking in Pivot table showing only TOP x Job Codes

is that your original file or it is an extraction from a pivot table ?

if you want to load that file, you will need to make a crosstable on the script

tmumaw
Valued Contributor

Re: Ranking in Pivot table showing only TOP x Job Codes

That's a dump from the already created pivot table.

YoussefBelloum
Esteemed Contributor

Re: Ranking in Pivot table showing only TOP x Job Codes

would you be able to attach a sample with the original file structure ? because with a pivot structure I'll need to do a crosstable and I'm not sure I will get your original structure

tmumaw
Valued Contributor

Re: Ranking in Pivot table showing only TOP x Job Codes

Youssef,

Thanks for your help.  My user called yesterday afternoon and wanted to go a different route other than Top 5 by year.  Go figure.