Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
GrantBooth
Creator
Creator

Multiple Values for Variable within Expression

I'm trying to use multiple values for an variable within an expression and I can't quite get the syntax right.

I have variable v.Example (obviously I am using proxies as I can't show my details)

Sum({< Category1 = {"$1"},
              Category2 = {"$2"}>}
Amount)/1000))

Category1 can take the following values up, down, left, right

Category2 can take the following values peppermint, topspin, Cthulu - 

I would like to be able to select more than value for each variable in my set expression so for example I would like

v.Example(down, [peppermint, Cthulu])

Can someone please help out with the correct syntax? 

Cheers

1 Solution

Accepted Solutions
anat
Master
Master

create variables like 

var1==GetFieldSelections(Category1)

var2==GetFieldSelections(Category2)

=sum({<Category1={'$(var1)'},Category2={'$(var2)'}>}Expression1)/1000

View solution in original post

2 Replies
anat
Master
Master

create variables like 

var1==GetFieldSelections(Category1)

var2==GetFieldSelections(Category2)

=sum({<Category1={'$(var1)'},Category2={'$(var2)'}>}Expression1)/1000

GrantBooth
Creator
Creator
Author

Thanks, but i'm not relying on the user to make selections, I'm trying to do it directly through an expression.