Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Expression as variable in field action on button object

Hi All,

i want to use input box, in which user will enter values and say for example i have pivot table having expression(say vExp) values like 0, 1200, 25022, 748974, 14258971 etc. My requirement is when user enters values in input box like 1200, then expression(say vExp) in pivot table should display values more than 1200.

for this, i created variable vMax and i used this variable in input box and created button. Now the problem is in button, under actions tab i used select in field option, in field action i am trying to use vExp in field action and in search string i used ='>'&vMax , values which are in expression of pivot table is not reflecting as per conditon given but it is working fine when i used loaded field say A in field action  with same condition i.e ='>'&vMax.

Help me guys,

Regards,

RK

3 Replies
Anil_Babu_Samineni

Will you able to provide the sample for the same?

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
sunny_talwar

If this is for your chart, why not use set analysis or if statement to restrict the number of rows?

sudeepkm
Specialist III
Specialist III

Button action "Select in Field" is only for Fields. To set values to variables you need to select Action > Add > External > Set Variable.

By the way if I understand your requirement then it seems like you can use an input box to get user input and store it in the variable and then that variable value can be used in the expression of your chart using set analysis.

Input box variable: v1

Chart:

Dimention: Category

Expression: sum({<[Category]={'=sum( [sales])>=$(v1) '}  >} [sales])