Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Not applicable

Dynamic set analysis based on table

Hello, I'm currently building a table with set analysis instructions

GroupSetAnalysis_Field
Red group{$<Color={"Red"}>
Blue Group{$<Color={"Blue"}>
Green Group{$<Color={"Green"}>

The idea is to add the group column to a table, so using the  Set Analysis field, set the filter in the operation:

'sum(' & SetAnalysis_Field & ' Volume)'

The concatenation works fine, but i can't make the formula work.

Any ideas of how to do this?

Thank you.

5 Replies
michael_gardner
Contributor III

Re: Dynamic set analysis based on table

Hi, just for a quick response I noticed that you SetAnalysis_Field records are missing the "}" to close off the set analysis.  Also try maybe sum($(SetAnalysis_Field)Volume)

Not applicable

Re: Dynamic set analysis based on table

thanks for pointing that out but the expression sum($(SetAnalysis_Field)Volume) didn't work

Partner
Partner

Re: Dynamic set analysis based on table

I don't think what you are trying will work.  Set analysis is performed before the table is generated and therefore cannot give different values based on table fields.

bhagirath
Contributor III

Re: Dynamic set analysis based on table

add that closing brace

and try sum($(=SetAnalysis_Field)Volume)

bhagirath
Contributor III

Re: Dynamic set analysis based on table

if you want to select multiple groups together you will have to use

concat function

GroupSetAnalysis_Field
Red groupRed
Green GroupGreen
Blue GroupBlue

{$<Color={$('"'&=concat(SetAnalysis_Field, ',')&"'")}>Volume)


or you can do the string processing in variable and keep your set analysis expression cleaner