Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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])
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])
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....
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])
Yes Sunny, this is the same expression we looked earlier.
So, growth_rank, %growth_rank, and PTQ_Rank are all variables?
Yes
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])
Thanks Sunny, it is working now but few fields are showing '-' due multiple values. How can we fix this?
Can you share a sample to show the issue? I won't know until I see.
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])