Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
qlikviewaf
Creator
Creator

Values as Variable

Hi Guys,

at the moment i have some formula where Item_Category are listed as below.

Because I have like 10 formula like this, in case in the future i will have to change the item category i will need to change 10 rules which is not so efficient.

I would like to map as variable the list of the category, and then enter in the formula the variable like Item_Category=Variable Name.

Is something possible? and which is the correct syntax for variable mapping and expression ?

Thank you!!

set analysis.PNG

2 Replies
sunny_talwar

You can do that... just grab the list of Item_Category and throw them in a variable

vItem

'FRT', 'IMP', 'IMPU', 'SCN', 'SMP'

and then your set analysis

Item_Category = {$(vItem)}

MK_QSL
MVP
MVP

Create a Variable

vItemCategory

Item_Category = {'FRI','IMP','IMPU','SCN','SMP'}

Now use

SUM({<Area -= {'Area-not-available'},$(vItemCategory)>}ExtendedUSD)

Ignore red lines...