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

How can i make a dynamic variable

I want to make a variable that can count the number of times any of my  filter gets selected.

For example if I select a value in a filter a number of times. I want to calculate the sum of total number of selection.

Should we use a for loop to achieve this . If yes how ?

17 Replies
pradosh_thakur
Master II
Master II

Hi guys

pfa attached . was trying a few things and got to this . i am able to get the number of count the filter has changed. of course there are some limitation. you will find out once you open the qvw. If possible please build something on top of it and try out something similar to help the OP. I am familiar with Qlikview so tried it in Qlikview. With all of yours help i guess we can easily replicate the final document to Sense.

Regards

Pradosh

Learning never stops.
sunny_talwar

I was thinking more like the attached

mdmukramali
Specialist III
Specialist III

Hi Sunny,

I was checking the application what expression you have used for vVar?



sunny_talwar

There is no expression used... it just get incremented by 1 when you select a value in the field. Also, it gets initialized to 0 using an 'On Open' trigger

mdmukramali
Specialist III
Specialist III

Hi Sunny,

found it in Event Triggers:

=RangeSum(vVar, 1)

Nice

Thanks,

Mukram.

sunny_talwar

One thing strange I am noticing is that if I select SubCategory, nothing happens (which is good), but when I clear SubCategory, the count increases by 1. I wonder how is unselecting SubCategory related to On Select on Category. I would have thought that they are unrelated, but seems like they are not which is a problem.

siddharthsoam
Partner - Creator II
Partner - Creator II
Author

Hi Sunny,

Can we use triggers in Qliksense too ? I am restricted to Qliksense only.

sunny_talwar

I am sure there is ought to be a Qlik Sense extension which allows you to have triggers, but I am just not the right guy to know about it.... may be someone else can help here