Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
abhijain
Partner - Contributor III
Partner - Contributor III

Show and Hide Chart

Hello,

Please suggest me how to show my chart on the basis of  only previous two months selections with respect to the current year and else hide my chart.

1 Solution

Accepted Solutions
Gysbert_Wassenaar

Here's a version that does what you want:


talk is cheap, supply exceeds demand

View solution in original post

9 Replies
Siva_Sankar
Master II
Master II

You assign a value to a variable that contains the condition you wish to evaluate. Button Properties Actions->Add Action->External Set Variable   Then within the chart properties Layout tab -> Show -> Conditional, you write an expression and check the value of the variable.

Not applicable

Hi,

Maybe you could check this one.

The attached file shows that whenever you choose previous 2 months based on current year, the chart will show up, else the chart will hide.

Regards,

Janzen

abhijain
Partner - Contributor III
Partner - Contributor III
Author

Hi,

Thanks but i want that chart should hide when current year is no selected  as i want to show the chart when only current year and previous two months are selected.

Not applicable

Hi,

Please see updated.

Regards,

Janzen

abhijain
Partner - Contributor III
Partner - Contributor III
Author

Thanks for ur support but actually  on selections of year and month i want the chart to get displayed or hide .And i dont need buttons

Gysbert_Wassenaar

Here's a version that does what you want:


talk is cheap, supply exceeds demand
abhijain
Partner - Contributor III
Partner - Contributor III
Author

I want that chart should  only  be shown when current year and only previous two months are shown

vlad_komarov
Partner - Specialist III
Partner - Specialist III

If I got it right: you want to show your chart only if you have last two months selected in your calendar, correct?

You can create few flags in your Calendar table:

,if (((monthstart($(vToday), -3) <= FullDate) and (monthstart($(vToday), 0) > FullDate)), 1, 0) as Last2MonthsFlag

,if (inyeartodate(FullDate, date($(vToday)), 0), 1, 0) as CYTD_Flag                    // current Year-to-Date

and use these flags to show/hide your chart.

Good luck,

Vladimir

abhijain
Partner - Contributor III
Partner - Contributor III
Author

Actually i need to add the expression in the chart layout itself.  Now the problem is when i select current year and a previous month the chart appears but when i select current year and two previous month the chart disappears but i want that chart should appear in this case also when i select current year and more the one previous month together.