Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
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
sunny_talwar

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
sunny_talwar

May be like this:

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

sunny_talwar

My bad, you might need this:

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


Capture.PNG

Not applicable
Author

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.

sunny_talwar

No problem, I am glad I was able to help