Databases Reference
In-Depth Information
Variable name
Variable definition
vSetPreviousQuarter
QuarterID = {$(=Max(QuarterID) -
1)},
Year = ,
Quarter = ,
Month = ,
Period =
vSetLYMTD
PeriodID = {$(=Max(PeriodID) -
12)},
Year = ,
Quarter = ,
Month = ,
Period =
vSetLYQTD
QuarterID = {$(=Max(QuarterID) -
4)},
Year = ,
Quarter = ,
Month = ,
Period =
vSetLYYTD
PeriodID = {"<=$(=Max(PeriodID) -
12)"},
Year = {$(=Max(Year) - 1)},
Quarter = ,
Month = ,
Period =
vSetRolling12
PeriodID = {">=$(=Max(PeriodID)-
11)<=$(=Max(PeriodID))"},
Year = ,
Quarter = ,
Month = ,
Period =
Once we have defined all of the preceding variables, the creation of new expressions
for period comparisons will be a very straightforward process.
Set expressions with parameters
We will expand the concept a bit further by incorporating what we discussed in the
previous chapter about variables with parameters and apply it to a set expression.
Let's follow these steps:
1.
Open the Variable Overview… window ( Ctrl + Alt + V ) and create a new
variable. Name it vSetPreviousNMonth .
Search WWH ::




Custom Search