Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Modernize Your QlikView Deployment webinar, Nov. 3rd. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Contributor II
Contributor II

Variable inside Set Analysis

Anyone please help to solve this issue.

// Not Working

SUM({$<Account={'Major','Non-Major'}>}$(vData))   // vData is a variable which pulls data

Thanks!!!

6 Replies
Highlighted
Partner
Partner

Can you post what vData is defined as?

Highlighted
Contributor II
Contributor II

If(MonthName='FEB', SUM({<MonthName={'NOV'},FYYear={'$(vFYCurrentYear)'},Account="Major","Non-Major"}>}[CurrentData])

Highlighted
Partner
Partner

$(vData) should be the name of a fiield, check by putting =vData in a textbox. Are there spaces in the field name, put square brackets around [$(vData)]

Highlighted
Partner
Partner

You're using a nested sum, which won't work. You can't have a Sum in your original function as well as in the variable you're calling.

Highlighted
Creator III
Creator III

your vData should be a field of your data model

Highlighted
Creator
Creator

Looking at your vData expression,

create another field (i.e. a flag) =1 for Month='FEB' in your script (considering this is the only condition you want to use), then write your expression as below,

SUM({<MonthName={'NOV'},FYYear={'$(vFYCurrentYear)'},Account={"Major","Non-Major"}>}[CurrentData]*New_Field)