Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
warrentk80
Creator
Creator

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

1 Solution

Accepted Solutions
Anonymous
Not applicable

  you need to use the concat function

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

View solution in original post

8 Replies
Anonymous
Not applicable

  you need to use the concat function

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

its_anandrjs

If you have to select more years then write like

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




senpradip007
Specialist III
Specialist III

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.

Anonymous
Not applicable

If it is a variable then try

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

sureshbaabu
Creator III
Creator III

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

rajeshvaswani77
Specialist III
Specialist III

Hi Andrea,

Declare a variable. Have the year assigned to this.

Then your set expression will be

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

thanks,

Rajesh Vaswani

Anonymous
Not applicable

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

SunilChauhan
Champion
Champion

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)

Sunil Chauhan