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

Qlikview Rank

I have the attached app but would like to rank/partition the data to only display unique instances.

For example, provide a Rank of 1 for every ID. When IDs are duplicated (example ID 5) take Gap_Indicator of Y and when there are example where I have duplicate ID, duplicate Gap_Indicator take the latest EndDATE.

1 Solution

Accepted Solutions
sunny_talwar

7 Replies
sunny_talwar

You need this in the script

Anonymous
Not applicable
Author

I would like to only display rank of 1 but at a later date I may display all of the data. So maybe in the script would be best.

sunny_talwar

I am not sure I understand what you are trying to convey. Would you be able to share the expected output?

Anonymous
Not applicable
Author

Current chart below. I would like to see an additional column of Rank.

   

Table Rank:

ID        StartDate      EndDate      Gap_Indicator   Rank

1            1/1/16           1/10/16             Y                    1

2            1/1/16           1/20/16             N                    1

3            1/1/16           1/11/16             Y                    1

4            1/1/16           1/12/16             Y                    1

5            1/1/16            1/10/16            Y                    1

5            1/1/16            1/30/16            N                    2

6             1/1/16            1/10/16           Y                    1

6             1/1/16            1/5/16             Y                    2

6              1/1/16           3/1/16             N                    3

Expected OutPut to only display where Rank = 1

sunny_talwar

Like this?

Capture.PNG

Anonymous
Not applicable
Author

Yes. Now if I wanted to only display values where rank = 1 would I create another table in the script?

sunny_talwar

Why not just use set analysis to do that on the front end? {<Rank = {1}>}