Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set analysis to sort league table points with according to points and goal differences

Hi guys, I have premier league data and i'm trying to create the league table on Qliksense. The one thing I realised with this ranking function is that teams that end up with the same points, it puts it as ‘1-2’ for example. It doesn’t take into consideration the goal differences. Is it possible to do a set analysis that would take into consideration of the goal differences and rank them primarily according to the points and secondarily to the goal difference? If in any case two teams have the same points and the same goal difference, then it should rank account to the alphabetical order. If this is possible could anyone please share?.

example this is what qliksense does with this set analysis. Rank(sum(Points))

Position,  Teams,     Points, Goal Difference              

1,           Man Utd     50          23

2,           Liverpool     45          45

3-4,        Arsenal       44          45

3-4,      Tottenham     44          44

This is what I'm looking for.

Position, Teams,     Points, Goal Difference              

1,           Man Utd     50          23

2,           Liverpool     45          55

3,           Arsenal          44          50

4,           Tottenham     44          48

1 Solution

Accepted Solutions
petter
Partner - Champion III
Partner - Champion III

Rank( Sum(Points) + Sum([Goal Difference])/100 )

Shouldn't that work for you?

Be aware of the additional parameters that Rank() can take to modify how the ranking is done. Look at the help.qlik.com to figure out the options you have ...

View solution in original post

4 Replies
petter
Partner - Champion III
Partner - Champion III

Rank( Sum(Points) + Sum([Goal Difference])/100 )

Shouldn't that work for you?

Be aware of the additional parameters that Rank() can take to modify how the ranking is done. Look at the help.qlik.com to figure out the options you have ...

Not applicable
Author

Hi, that worked. Thank you very much.

petter
Partner - Champion III
Partner - Champion III

Happy to help - can you please close the thread by marking the question "answered" ?

Not applicable
Author

Yes i will do. thank you