Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
Not applicable

Using Rank and aggr Function

Hi There

I have the following data

PhaseNo, Tackles Missed

1,2

1,1

1,1

2,4

2,1

3,2

4,5

5,1

5,1

6,2

6,2

6,1

I need to rank PhaseNo by sum of Tackles Missed (i.e. I need to know which Phase has the most Tackles Missed by rank)

Thanks

Kevin

1 Solution

Accepted Solutions
MVP
MVP

Re: Using Rank and aggr Function

Create a Straight Table

Dimension

PhaseNo

Expression

NUM(Rank(TOTAL SUM([Tackles Missed]),4))

or

NUM(Rank(TOTAL COUNT([Tackles Missed]),4))

Whatever is applicable to your application.

12 Replies
MVP
MVP

Re: Using Rank and aggr Function

Create a Straight Table

Dimension

PhaseNo

Expression

NUM(Rank(TOTAL SUM([Tackles Missed]),4))

or

NUM(Rank(TOTAL COUNT([Tackles Missed]),4))

Whatever is applicable to your application.

Not applicable

Re: Using Rank and aggr Function

Thank you Manish

Worked perfectly

Is there a way to create the same rank without a dimension (due to the layout of the report)

Re: Using Rank and aggr Function

You can also use,

Aggr(Rank(Sum([Tackles Missed]),4,1),PhaseNo)


or


Num(Aggr(Rank(Sum([Tackles Missed]),4),PhaseNo))

or

Aggr(Rank(Sum([Tackles Missed]),4),PhaseNo)

Sample attached against your data.

MVP
MVP

Re: Using Rank and aggr Function

How you want the output without dimension? Can you please provide here?

Not applicable

Re: Using Rank and aggr Function

I am looking to find rank the Phases with the most tackles using a text object due to the layout of the report

I can only show 1 Phase at a time. From there I am looking to use rank as a heatmap

Re: Using Rank and aggr Function

Use the below expression in textbox,

=Only({<PhaseNo = {"=Num(Aggr(Rank(Sum([Tackles Missed]),4),PhaseNo))=1"}>}PhaseNo)

Not applicable

Re: Using Rank and aggr Function

It works

Thank you for the help

oknotsen
Honored Contributor III

Re: Using Rank and aggr Function

If your question is now answered, please flag the Correct Answer.

If not, please tell us what help you still need with this question.

May you live in interesting times!
Not applicable

Re: Using Rank and aggr Function

Hi Onno

Yes sure... Where do I mark the answer as correct

Community Browser