5 Replies Latest reply: Jun 21, 2011 2:48 AM by Anand Chouhan RSS

    From Date and To Date Selection

    Anand Chouhan

      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

        • Re: From Date and To Date Selection
          Kaushal Mehta

          Hi,

          see the attached file.

          without macro

            • Re: From Date and To Date Selection
              Anand Chouhan

              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
                  Miguel Angel Baeyens de Arce

                  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

                  • Re: From Date and To Date Selection
                    Angus Monro

                    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
                        Anand Chouhan

                        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