Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have a period column which contains value like 201708,201709,201710 etc.
I have to extract the value from another file based on the current period only.
Eg. In file A I have Period columns contain 201708,201709,201710 etc. where as in file B I have entire history details and need to extract only the data for Current month. and for some related to previous month
I have created a variable as shown below
vCurrentYear: Left([PERIODO],4)
vCurrentMonth: Right([PERIODO],2)
vPreviousYear: Left([PERIODO]-1),4)
vPreviousMonth: Right(([PERIODO]-1),2)
For Previous month and year variable is not working at the script level where as it is working fine in text object.
And Can anyone confirm me whether it is the right approach or not?
and will variable values in the script will change automatically when period value changes .
Try these:
vPeriod = Date#(PERIODO,'YYYYMM')
vCurrentYear = Year($(vPeriod))
vCurrentMonth: Month($(vPeriod))
vPreviousYear: Year($(vPeriod))-1
vPreviousMonth: Month(MonthStart($(vPeriod),-1))
and will variable values in the script will change automatically when period value changes
Yes. if you calculate the variables in the script then they will be change during reload when the source data contains new data
Try these:
vPeriod = Date#(PERIODO,'YYYYMM')
vCurrentYear = Year($(vPeriod))
vCurrentMonth: Month($(vPeriod))
vPreviousYear: Year($(vPeriod))-1
vPreviousMonth: Month(MonthStart($(vPeriod),-1))
and will variable values in the script will change automatically when period value changes
Yes. if you calculate the variables in the script then they will be change during reload when the source data contains new data
Are you going call variables into Field ?? Where and what is not working for you?
Thank you so much for your response!!!