Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Select a date and work with data from another date

Hello,

i have something like this:

TABLE_A:

LOAD
MONTHYEAR,

ID,

DATA

FROM

(qvd);

;

TABLE_QVD:

LOAD

MONTHYEAR_QVD,

ID,
DATA_QVD

FROM

(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!

1 Reply
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.


talk is cheap, supply exceeds demand