Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
BARC’s The BI Survey 19 makes it official. BI users love Qlik. GET REPORT
Highlighted
Not applicable

create graph on basis of ranking

Dear all,

I have a database consisting of names, awards and number of awards. If I make a pivot table, it would look like something like the left table:

Knipsel.PNG

Creating the first graph in qlikview isn't a problem; the second and third graph are. From the person with the highest number of awards (and the second best) I would like to create a graph with a distribution on different awards. I Tried to do something with aggr() and rank(). I was able to create the graph of the person with the most awards (show top 1), but I failed creating a graph for the second best.

Any hints and ideas?

regards

Per.

1 Solution

Accepted Solutions

Re: create graph on basis of ranking

Check the attached

Capture.PNG

3rd chart

Dimension

Awards

Expression

=Sum({<Name = {"=Rank(Count(Awards)) < 2"}>}Sum)

4th chart

Dimension

Awards

Expression

=Sum({<Name = {"=Rank(Count(Awards)) > 2 and Rank(Count(Awards)) < 4"}>}Sum)

View solution in original post

4 Replies
MVP
MVP

Re: create graph on basis of ranking

I suggest that you upload a small sample qvw which includes the first graphs for more specific and accurate suggestions one how to achieve the last. Briefly, though, you should be able to select the second ranked using a rank expression.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein

Re: create graph on basis of ranking

Check the attached

Capture.PNG

3rd chart

Dimension

Awards

Expression

=Sum({<Name = {"=Rank(Count(Awards)) < 2"}>}Sum)

4th chart

Dimension

Awards

Expression

=Sum({<Name = {"=Rank(Count(Awards)) > 2 and Rank(Count(Awards)) < 4"}>}Sum)

View solution in original post

vinieme12
Esteemed Contributor II

Re: create graph on basis of ranking

does Sort by Y-Value not work?

Not applicable

Re: create graph on basis of ranking

Thanks all for the fast responses. The solution of Sunny T works perfectly. I wish I didn't spend 2 days of trying ;-).