Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Button Selection Issue

Hi,

I have two expressions for Year and Month.i created two buttons like year and month, if I click on Year button it has to show year values and if I click on month button it has to show month values.always two buttons are in visible.Please help me  .

Thanks in advance

Best Regards

Anusha

1 Solution

Accepted Solutions
Not applicable
Author

HI anusha,

To be in clear,

step 1- Create 2 variables vYear, vMonth

Step2- Create 2 buttons year and month and set actions for year set variable - vyear to 1 and second action vMonth to 0

           and do the vice versa for month button

Step 3- Apply layout condition for list box year as =if(vYear=1,1,0) and for month as =if(vMonth=1,1,0)

Hope this helps.

Best Regards,

Susvith

View solution in original post

8 Replies
prasadcm
Creator II
Creator II

I am not getting your question.

Can u please elaborate your query.

if I click on Year button it has to show year values and if I click on month button it has to show month values.always two buttons are in visible? but where u want it to be displayed?

Anonymous
Not applicable
Author

Hi,

Your requirement is not clear. Where do you have the expressions? Is it in a chart or list box? In case of list box, define a variable which will be set to a value on clicking the button. Use this variable's value in the layout tab of the list box to show/hide it.

Regards,

Greeshma

Not applicable
Author

HI anusha,

To be in clear,

step 1- Create 2 variables vYear, vMonth

Step2- Create 2 buttons year and month and set actions for year set variable - vyear to 1 and second action vMonth to 0

           and do the vice versa for month button

Step 3- Apply layout condition for list box year as =if(vYear=1,1,0) and for month as =if(vMonth=1,1,0)

Hope this helps.

Best Regards,

Susvith

Anonymous
Not applicable
Author

in charts and text boxes

Not applicable
Author

you can use this logic to show n hide month field

1. create variable vMonth=0

2.add button -> create action with action 'External' - 'Set Variable'

  Put the variable name into the appropriate field

  vMonth

  and enter as expression

  =if(vMonth,0,1)

3.in listBox properties enter as conditional show expression in layout tab as 'vMonth'

same thing u can do for year

avinashelite

hi Anusha,

Share your app with the data, we will help you out with the requirement

sunilkumarqv
Specialist II
Specialist II

Hi Anusha

plz check the link

Dynamically Selecting Timeframes

Anonymous
Not applicable
Author

Thank you all for your quick responses