Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
tmumaw
Specialist II
Specialist II

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

1 Solution

Accepted Solutions
YoussefBelloum
Champion
Champion

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

View solution in original post

8 Replies
YoussefBelloum
Champion
Champion

Hi,

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

tmumaw
Specialist II
Specialist II
Author

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

YoussefBelloum
Champion
Champion

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

tmumaw
Specialist II
Specialist II
Author

Forgot to add the spreadsheet thanks

YoussefBelloum
Champion
Champion

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
Specialist II
Specialist II
Author

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

YoussefBelloum
Champion
Champion

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
Specialist II
Specialist II
Author

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.