Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Save the Date: QlikWorld Online, June 24-25, 2020. Free global virtual event for data integration and data analytic gurus. Register Today
Not applicable

Points behind leader - rank set analysis

I have a simple requirement and have tried multiple calculations but cannot get the required result.

The following is the required result from an excel spreadsheet.

   

PlayerRankPointsBehind
John19410
Bill2919-22
Dave3853-88
Lisa4835-106
Carla5832-109
Joe 6831-110
Carl7826-115
Kim8817-124
Sheri9760-181

The BEHIND column is what I cannot get a correct calculation for.  In pseudo code it would be

sum(rank = 1)Points minus sum(Points)

I need to show the number of points each player is behind the leader.

The main issue is that there can be multiple selections which give different players, ranks and points so I cannot hard code anything or pre-calculate anything as the selections change the data.  So the calculation must be in the straight table.

All help is appreciated.  Thanks

1 Solution

Accepted Solutions
Highlighted

Re: Points behind leader - rank set analysis

My bad, you might need this:

Sum(Points) - Sum(TOTAL {<Player = {"=Rank(Sum(Points)) < 2"}>} Points)


Capture.PNG

View solution in original post

4 Replies
Highlighted

Re: Points behind leader - rank set analysis

May be like this:

Sum(TOTAL {<Player = {"=Rank(Sum(Points)) < 2"}>}Points) - Sum(Points)

Highlighted

Re: Points behind leader - rank set analysis

My bad, you might need this:

Sum(Points) - Sum(TOTAL {<Player = {"=Rank(Sum(Points)) < 2"}>} Points)


Capture.PNG

View solution in original post

Highlighted
Not applicable

Re: Points behind leader - rank set analysis

Awesome thanks so much.  I appreciate it.

Yes, the second one is what I need.

You answered many of the other posts that I read trying to figure this out as well.  Thanks for everything.

Highlighted

Re: Points behind leader - rank set analysis

No problem, I am glad I was able to help