Variables are used to dynamically load values into formulas and date intervals.
To create a new filter, open the Variables sidebar.
- Click on Edit button to enter Variables dialog.
- Select which type of variable you would like to create:
- Date variable
- Text variable
- Number variable
- Optionally, change the identifier.
- Click on Add.
- Optionally, select default value. See below.
- Optionally, edit the Advanced settings to change the appearance and functionality of the variable. See below.
- Save the variable.
APPLYING VARIABLE AS RELATIVE DATE
- Display default relative dates by selecting option Use relative dates
- Allow Autosubmit after selection (every timeuser selects a value, the setting will be automatically saved)
- Select Display mode (Radio, Select, Checklist)
- Set Preset values (displayed Name of the value, and Definition of the value - g.e. "now-2d" as the day before yesterday)
In the definition of the value can be used following date strings:
|Relative date||Actual value|
Current week (first day of week)
For example, actualWeek selected on 21.9.2010 represents date 20.9.2010 (Monday of this week in calendar)
Current month (first day of month)
For example, actualMonth selected in 21.9.2010 represents date 1.9.2010
Current quarter (first day of quarter)
For example, actualQuarter selected on 21.9.2010 represents date 1.7.2010
Current year (1st January of current year)
For example, actualYear selected on 21.9.2010 represents date 1.1.2010
Represents the first and last available date entry
Relative and absolute date can be adjusted by operators using this syntax: date +|- n[d|w|m|q|y], where n is integer, d represents day, w represents week, m represents month q represents quarter and y represents year. We can for example define time in this way: actualyear + 2m -4d. Today is 21.9.2010, so this value represents 1.1.2010 + 2 months - 4 days, which means date 25.2.2010.
It is possible to translate both the name of the variable and the preset values of a date variable. After clicking on the name or the value, users can select the language and add the translation.