Set modifiers with expressions

As well as using strings, numbers, or functions such as P() and E(), you can also use expressions as set modifier values.

To use expressions as values, you must enclose the expression in $(= ) which is called dollar-sign expansion. The expression must go between $(= and ), for example:

$(=max(Date))

Now, let's have a look at the following expression:

SUM({$< [Year] = {2018} >} Sales)

The preceding example returns the sales for 2018. If by 2018 we mean the current year, you could replace the value 2018 with a function that returns the current year such as year(today()).

This will prevent you from having to change the expression for every new year. The modified expression with the set modifier using an expression as value looks as follows:

SUM({$< [Year] = {$(=year(today()))} >} Sales)
Make sure your expression returns a value of the same type of the field being modified. 
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
52.14.240.252