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

Announcements
ALERT: QlikView server communication interruptions following Microsoft Windows Domain Controller security updates
cancel
Showing results for 
Search instead for 
Did you mean: 
vamshi_1241
Partner - Creator
Partner - Creator

Overall rank is changing based on selection

Hi,

I have growth_rank, %growth_rank and PTQ _rank in my report. I had to show the overall rank (over these ranks) and I did and ranks are showing as expected but whenever we make a single selection on dimension,rank is showing 1 but I want their actual ranks after selection. Please let me know what I should do in this scenario.

Below is the logic I have written in expression:

aggr({1}Rank(

Aggr({1}Rank(growth_rank, 4,1),[Rep])

+

Aggr({1}Rank(%growth_rank,4,1),[Rep])

+

Aggr({1}Rank(PTQ_Rank ,4,1), [ Rep]),4,1),[Territory - Level 10 Rep])

Labels (1)
1 Solution

Accepted Solutions
vamshi_1241
Partner - Creator
Partner - Creator
Author

Resolved by following expression.

Aggr(

     Rank(

          Only({1} Aggr(Rank(Only($(growth_rank)), 4,1), [Rep]))+

          Only({1} Aggr(Rank(Only($(%growth_rank)), 4,1), [Rep])) +

          Only({1} Aggr(Rank(Only($(PTQ_Rank)), 4, 1), [Rep]))

     , 4, 1)

, [Rep])

View solution in original post

10 Replies
sunny_talwar

Is this the same expression that we looked earlier or is this something new? I think that you need to not use the set analysis {1} in Aggr() but in Sum, Max, Min, Median, Concat, Avg,... etc to ignore selection....

sunny_talwar

May be like this

Aggr(

     Rank(

          Only({1} Aggr(Rank(Only({1} growth_rank), 4,1), [Rep]))+

          Only({1} Aggr(Rank(Only({1} %growth_rank), 4,1), [Rep])) +

          Only({1} Aggr(Rank(Only({1} PTQ_Rank), 4, 1), [Rep]))


     , 4, 1)

, [Territory - Level 10 Rep])

vamshi_1241
Partner - Creator
Partner - Creator
Author

Yes Sunny, this is the same expression we looked earlier.

sunny_talwar

So, growth_rank, %growth_rank, and PTQ_Rank are all variables?

vamshi_1241
Partner - Creator
Partner - Creator
Author

Yes

sunny_talwar

Not sure what all things we tried, but can you try this?

Aggr(

     Rank(

          Only({1} Aggr(Rank(Only({1} growth_rank), 4,1), [Rep]))+

          Only({1} Aggr(Rank(Only({1} %growth_rank), 4,1), [Rep])) +

          Only({1} Aggr(Rank(Only({1} PTQ_Rank), 4, 1), [Rep]))


     , 4, 1)

, [Territory - Level 10 Rep])

vamshi_1241
Partner - Creator
Partner - Creator
Author

Thanks Sunny, it is working now but few fields are showing '-' due multiple values. How can we fix this?

sunny_talwar

Can you share a sample to show the issue? I won't know until I see.

vamshi_1241
Partner - Creator
Partner - Creator
Author

Resolved by following expression.

Aggr(

     Rank(

          Only({1} Aggr(Rank(Only($(growth_rank)), 4,1), [Rep]))+

          Only({1} Aggr(Rank(Only($(%growth_rank)), 4,1), [Rep])) +

          Only({1} Aggr(Rank(Only($(PTQ_Rank)), 4, 1), [Rep]))

     , 4, 1)

, [Rep])