3 Replies Latest reply: Jun 17, 2011 1:30 AM by Jeroen Vuurens RSS

    Macro for From Date To Date Selection

    Anand Chouhan

      Hi All,


      I have a query in that i have a three types of date which are in date format and there is different pivot charts for each dates i use calender object to select

      From Date to To Date . But problem is that when i select From Date then all the values get effective in all pivot charts but i dont want that i make on button and apply a macro on that to get effective From Date to To Date in all pivot charts because in charts i use condition from date and to date variable.


      Please provide help for that.



      Hi all


      i tried that but i attach a small app for demo what i want please check and revert me with updates.





        • Macro for From Date To Date Selection

          Well, what you could do is create a duplicate table with selectable_from_date-s to use as a select field. In the chart where you want to use the selectable_from_date, you modify the expression like:

          Count({$<from_date=selectable_from_date>} id)


          In other charts you would refer to other selectable fields. Because the field selectors are not connected to your data table, it doesn't affect other charts.


          Does that help?



            • Macro for From Date To Date Selection
              Anand Chouhan

              Hi Jeroen


              Thanks for the suggestion please explain with any small example.



                • Macro for From Date To Date Selection

                  LOAD * INLINE [
                  id, from_date, to_date, create_date
                  1, 1/1/2011, 2/2/2011, 3/3/2011
                  2, 1/1/2011, 3/3/2011, 4/4/2011
                  3, 2/2/2011, 3/3/2011, 3/3/2011
                  4, 4/4/2011, 4/4/2011, 5/5/2011];

                  LOAD DISTINCT from_date as selectable_from_date RESIDENT DATE;
                  LOAD DISTINCT to_date as selectable_to_date RESIDENT DATE;
                  LOAD DISTINCT create_date as selectable_create_date RESIDENT DATE;

                  And then create select fields for selectable_from_date, selectable_to_date and selectable_create_date. In your graphs, refer to the selection you want to use by for instance using


                  Count( {$<from_date=selectable_from_date>} id )