Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

abhijain
New 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

Re: Show and Hide Chart

Here's a version that does what you want:


talk is cheap, supply exceeds demand
9 Replies
Siva_Sankar
Honored Contributor

Re: Show and Hide Chart

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

Re: Show and Hide Chart

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
New Contributor III

Re: Show and Hide Chart

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

Re: Show and Hide Chart

Hi,

Please see updated.

Regards,

Janzen

abhijain
New Contributor III

Re: Show and Hide Chart

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

Re: Show and Hide Chart

Here's a version that does what you want:


talk is cheap, supply exceeds demand
abhijain
New Contributor III

Re: Show and Hide Chart

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

vlad_komarov
Valued Contributor III

Re: Show and Hide Chart

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
New Contributor III

Re: Show and Hide Chart

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.

Community Browser