March 2018
Beginner to intermediate
514 pages
13h 11m
English
The same way you can use variables to replace string values in set modifiers, you can use variables to hold numbers if the field is of a number type. An example of a field of number type is Year.
The following example returns the sales for the year 2018:
sum({$< [Year] = {2018} >} Sales)
The Year field is of a type number, and thus the values in the set analysis must not be enclosed in single or double quotes.
Assuming we create two variables in the script, one for the year and one for my field Sales as follows:
LET vCurrentYear = year(today());SET vMySalesField = '[Sales]';
We could now make the expression use the two variables as follows:
sum({$< [Year] = {$(vCurrentYear)} >} $(vMySalesField))
Note that ...
Read now
Unlock full access