Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
vidyasagar159
Creator II
Creator II

How to assign drop value to a variable?

Hi,

Hope you guys are doing great. I want to assign a drop-down value to one of the rank expression.

Load Script:

Rank_Table:

load * inline

[

dim,Rank

Top5,5

Top10,10

Top15,15

Top20,20

Top25,25

];

Drop Down: So when I select Top5, 5 has to apply to the below dimension expression.

dropdown.png

Dimension Expression:

=if(aggr(rank(sum(FUNDBALANCE)),PLANYEAR,COMPANY)<=VARIABLE,aggr(rank(sum(FUNDBALANCE)),PLANYEAR,COMPANY))

Thanks in advance!!

1 Solution

Accepted Solutions
vidyasagar159
Creator II
Creator II
Author

Actually, I found this issue long time back but forgot to update.

All I need to update this in a Measure expression and NOT in the dimension.

sum({$<company={"=aggr(rank(sum(FUNDBALANCE)),PLANYEAR,COMPANY)<=VARIABLE"}>}fundbalance)

View solution in original post

6 Replies
sunny_talwar

Have you tried this

=if(aggr(rank(sum(FUNDBALANCE)),PLANYEAR,COMPANY)<=Rank, aggr(rank(sum(FUNDBALANCE)), PLANYEAR, COMPANY))

vidyasagar159
Creator II
Creator II
Author

Yes. I tried it. Only Top5 is working. Getting empty records when Top10 and above are getting selected.

sunny_talwar

Would you be able to share a sample?

vidyasagar159
Creator II
Creator II
Author

Please find the sample images below.

Top5:

Top5.PNG

Top10:

Top10.PNG

sunny_talwar

I see the problem, but can't really test anything . May be someone else can have better ideas

vidyasagar159
Creator II
Creator II
Author

Actually, I found this issue long time back but forgot to update.

All I need to update this in a Measure expression and NOT in the dimension.

sum({$<company={"=aggr(rank(sum(FUNDBALANCE)),PLANYEAR,COMPANY)<=VARIABLE"}>}fundbalance)