Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

Announcements
Modernize Your QlikView Deployment webinar, Nov. 3rd. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
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
Highlighted
Anonymous
Not applicable

  you need to use the concat function

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

View solution in original post

8 Replies
Highlighted
Anonymous
Not applicable

  you need to use the concat function

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

View solution in original post

Highlighted

If you have to select more years then write like

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




Highlighted
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.

Highlighted
Creator II
Creator II

If it is a variable then try

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

Highlighted
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

Highlighted
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

Highlighted
Specialist II
Specialist II

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

Highlighted
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)