Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
Not applicable

GetFieldSelections in Set Analysis

I need some help with finding an alternative go below:

= NUM(Avg({$<INSPECTION_ITEM={'Overall Satisfaction.'},
InspectionMonth = {'$(=GetFieldSelections(Month))'},InspectionYear = {'$(=GetFieldSelections(Year))'},Month={'*'},Year={'*'}>}INSPECTION_SCORE_RAW),'#.##')

Basically I am trying to have InspectionMonth be whatever the user selects in the Month field. Unfortunately the way our data works there’s so many dates, Request Date, Closed Date, Inspection Date, etc.. So I have a main calendar, and a couple other calendars to be referenced. . I opted out to having multiple month/year selectors on the page so the user doesn’t get confused. However that is causing me to go kind of crazy in some of the calculations.

All suggestions are very much appreciated,


I originally used:

= NUM(Avg({$<INSPECTION_ITEM={'Overall Satisfaction.'},

InspectionMonth = P(Month),InspectionYear = P(Year),Month={'*'},Year={'*'}>}INSPECTION_SCORE_RAW),'#.##')

But It did not calculate correctly.

3 Replies
Contributor II

Re: GetFieldSelections in Set Analysis

Hi there.

I believe your expressions can be simplified, try:


instead of


Also, take a look at the documentation for the function P() to avoid using GetFieldSelections().

Kind regards,


Not applicable

Re: GetFieldSelections in Set Analysis

Unfortunately "P()" is not what I am looking for.

Essentially what I am trying to do is use another field 1 toggle, to change field 2 in set analysis.

If November is selected in Month.

I want set analysis to define 'InspectionMonth = Nov' and then include all 'Month' possibilities.

Sorry if I am wording this awfully.


Re: GetFieldSelections in Set Analysis


Try this expression, single quotes should not be used for InspectionMonth and Year.

= NUM(Avg({$<INSPECTION_ITEM={'Overall Satisfaction.'},
InspectionMonth = {$(=GetFieldSelections(Month))},InspectionYear = {$(=GetFieldSelections(Year))},Month=,Year=>}INSPECTION_SCORE_RAW),'#.##')

Hope this helps you.



Community Browser