Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
you need to use the concat function
sum({$<yourdate={"$(=concat(selecteddates,'","'))"} >}Value
you need to use the concat function
sum({$<yourdate={"$(=concat(selecteddates,'","'))"} >}Value
If you have to select more years then write like
sum ({$ <[Year] = {'2014','2013','2012'}>} orders)
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.
If it is a variable then try
sum({<Year={"$(elencoanni)"}>}Orders)
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
Hi Andrea,
Declare a variable. Have the year assigned to this.
Then your set expression will be
sum ({$ <[Year] = {"=$(velencoanni)"}>} orders)
thanks,
Rajesh Vaswani
sum ({$ <[Year] ={$(=GetFieldSelections([elencoanni]))} >} orders)
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)