Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.

From Date and To Date Selection

Hi All,

I want to make a macro or any other way to make a selection between From Date and To Date selection. I attached a small sample file please check it and give suggestion for that. After button press want to make changes in the pivot chart right now it happens when i make a selection in the calender objects.

Anand

5 Replies
kaushalview
Contributor II

Re: From Date and To Date Selection

Hi,

see the attached file.

without macro

Re: From Date and To Date Selection

Hi,

Thanks but on button press i want to reflect it on pivot charts or other object. Right now when i select dates in FromDate and ToDate it sudenly changes. Please if it is work on button.

Anand

Regards

Re: From Date and To Date Selection

Hello,

I may be missing something but there is no need for the button, since every time you change the values in the variables via calendar object, its values will update the If() condition you are using. By the way, I'd change the existing expression

sum(if(ZRdate>=v_MinDate and ZRdate <= v_MaxDate, AmountCollected))

To a set analysis

Sum({< ZRDate = {">=$(=Date(v_MinDate))<=$(=Date(v_MaxDate))"} >} AmountCollected)

On the other hand, if the expression with the if() doesn't change values is because the format in ZRdate field and v_MinDate and v_MaxDate variables is different.

With the code above in your expression, you will not need macros or any other "update" button.

Hope that helps.

Miguel Angel Baeyens

BI Consultant

Comex Grupo Ibérica

gussfish
Contributor II

Re: From Date and To Date Selection

Hi,

the trick would be for your calendar selectors to use a different pair of date variables to what your chart expressions use.  The macro that you trigger when you press the button then needs to copy the calendar selectors' variables across to the variables used in the chart expressions.

But honestly, why would you want to do such a thing?  Is there a problem with the normal way things are done in QlikView, that all updates are done immediately and dynamically so that users don't need to press more buttons than they need to? 


Have fun getting to know QlikView.

Angus.

Re: From Date and To Date Selection

Hi Monro,

You are correct but problem is that i have a 12 pivot charts in a sheet and 4 types of diferent dates columns and we are want to view the pivot charts from certain date selection like From Date to To Date and this 4 different date columns should change according to calender selection From Date to To Date but when we select dates in calender selection a data should suddenly changes like i select From Date it suddenly response. Or due to data change the all pivot charts should refresh. Thats why we need to make it on Button press. And this 12 charts are using that 4 types of date which is in pure in Date format.Please provide help for that.

Anand

Regards

Community Browser