8 Replies Latest reply: May 13, 2014 7:48 AM by Sunil Chauhan

# Set Analisys

Hello to all

I need to include in the syntax by SET analisys a field or variable in the comparison instead of a string, but the formula gives me error.

here is the formula that I use:

sum ({\$ <[Year] = {'2014 '}>} orders) so it works

but I would need to use after = a field where I select more years.

then sum ({\$ <[Year] = {[elencoanni]}>} orders)

how should I do?

thanks

Best Regards

Andrea

• ###### Re: Set Analisys

you need to use the concat function

sum({\$<yourdate={"\$(=concat(selecteddates,'","'))"} >}Value

• ###### Re: Set Analisys

If you have to select more years then write like

sum ({\$ <[Year] = {'2014','2013','2012'}>} orders)

• ###### Re: Set Analisys

If you want the result for a particular year you could use like sum ({\$ <[Year] = {'2014 '}>} orders) which you have already done. But if you want more than one value on the basis of [elencoanni] dimenssion, you don't need to use set analysis.

• ###### Re: Set Analisys

If it is a variable then try

sum({<Year={"\$(elencoanni)"}>}Orders)

• ###### Re: Set Analisys

Hello,

You can use variables as below on a set analysis expression

Variable: Vmaxyear= max(year)

Expression : SUM({\$Year={'\$(Vmaxyear)'}>}Orders)

Hope this helps!!

Thanks

• ###### Re: Set Analisys

Hi Andrea,

Declare a variable. Have the year assigned to this.

Then your set expression will be

sum ({\$ <[Year] = {"=\$(velencoanni)"}>} orders)

thanks,

Rajesh Vaswani

• ###### Re: Set Analisys

sum ({\$ <[Year] ={\$(=GetFieldSelections([elencoanni]))} >} orders)

• ###### Re: Set Analisys

sum({\$<Year={\$(=Getfieldselections(Year)} >}Value)

or

sum({\$<Year={"\$(=Getfieldselections(Year)"} >}Value)

or

sum({\$<Year={'\$(=Getfieldselections(Year)'} >}Value)

or

sum({\$<Year={\$(=concat(Year,","))} >}Value)

or

sum({\$<Year={"\$(=concat(Year,","))"} >}Value)