Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Announcing the newest addition to the Qlik Community, Qlik Gallery! Learn More
vidyasagar159
Contributor 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
Highlighted
vidyasagar159
Contributor II

Re: How to assign drop value to a variable?

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)

6 Replies

Re: How to assign drop value to a variable?

Have you tried this

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

vidyasagar159
Contributor II

Re: How to assign drop value to a variable?

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

Re: How to assign drop value to a variable?

Would you be able to share a sample?

vidyasagar159
Contributor II

Re: How to assign drop value to a variable?

Please find the sample images below.

Top5:

Top5.PNG

Top10:

Top10.PNG

Re: How to assign drop value to a variable?

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

Highlighted
vidyasagar159
Contributor II

Re: How to assign drop value to a variable?

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)