Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Rank Function

Hi All

I am new to Qlikview and struggling to use the rank function for the following data

I have a Dimension with the following Fields

PhaseDim (Dimension)

PhaseSetPiece

PhaseOpenPlay

PhaseUnstrucruredPlay

PhaseRuckSpeed

PhaseLineShape

PhaseAdvLineDefence

In a straight table I have the following Dimenions

- Phase Dim

- =if(PhaseValue = 0 ,'',PhaseValue)

- =aggr(sum({$<DefencePhaseSort = {$(#vPHASENO1)}>} [DefenceTacklesMissed]),PhaseValue,PhaseDim)

I then have an expression extracting the max value from each field

=if(PhaseValue = 0 ,'',max(aggr(sum({$<DefencePhaseSort = {$(#vPHASENO1)}>} DefenceTacklesMissed),PhaseValue,PhaseDim)))

I am trying to rank each field from highest to lowest so that I can apply a heatmap to the table

I keep on getting the same number returned for all field

Regards

1 Solution

Accepted Solutions
swuehl
MVP
MVP

If you are using more than one dimension and you want to rank across all lines in a straight table, you need to use the TOTAL qualifier in rank() function:

=Rank(TOTAL .....)

If you are using a pivot table and you want to rank across all columns (horizontal ranking) you need to use HRank() function.

If this does not help, please post a small sample QVW that demonstrate your issue.

View solution in original post

1 Reply
swuehl
MVP
MVP

If you are using more than one dimension and you want to rank across all lines in a straight table, you need to use the TOTAL qualifier in rank() function:

=Rank(TOTAL .....)

If you are using a pivot table and you want to rank across all columns (horizontal ranking) you need to use HRank() function.

If this does not help, please post a small sample QVW that demonstrate your issue.