1 Reply Latest reply: Jan 15, 2016 12:55 PM by Gysbert Wassenaar RSS

    Select a date and work with data from another date

    Roger Grossi

      Hello,

      i have something like this:

       

      TABLE_A:

      LOAD
      MONTHYEAR,

      ID,

      DATA

      FROM

      [C:\EXAMPLE.QVD]

      (qvd);

      ;

       

      TABLE_QVD:

      LOAD

      MONTHYEAR_QVD,

      ID,
      DATA_QVD

      FROM

      [C:\EXAMPLE_QVD.QVD]

      (qvd);

       

       

      What I need it is that when you select a date of the filter ( MONTHYEAR ) , for example: January, then only work with data from the previous month(December) of the QVD file EXAMPLE_QVD.QVD ( MONTHYEAR_QVD )

       

      Thank you!

        • Re: Select a date and work with data from another date
          Gysbert Wassenaar

          Make sure your MONTHYEAR* fields are dates. Text values can't be subtracted from each other in a meaningful way.

          Then you can use a Select in Field action assigned to the OnSelect trigger of the MONTHYEAR field to select the previous month in the MONTHYEAR_QVD field with a search string like

           

          =Date(AddMonths(MONTHYEAR,-1),'YYYYMM')

           

          The date format YYYYMM assumes that your MONTHYEAR* fields contain dates with a format YYYYMM. If the date format is something else then you need to adjust the format string in the Date function accordingly.