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: 
Not applicable

set analysis and getfieldselections

Hi,

I am using the following expression

sum({<[Budget Month] = {'$(= GetFieldSelections([Forecast Month]))'}>}Budget)

It only works if I select one value from Forecast month. If I select multiple months from foreclast month, the value is zero. I want that if no forecast month is selected, take sum of all budget months, otherwise take the sum of budget for those budget months for which I select the forecast months from listbox

Forecast month and budget months are two different month fields.

Arif

4 Replies
Not applicable
Author

Try to create this variable:

vForecastMonths

=replace(chr(39)&concat([Forecast Month],',')&chr(39),',',chr(39)&','&chr(39))

and change to this the expression:

sum({<[Budget Month] = {$(vForecastMonths)}>}Budget)

Hope this helps

tresesco
MVP
MVP

Try:

=Sum({<[Budget Month]={$(=Concat(Distinct chr(39)&[Forecast Month]&chr(39),','))}> }Budget)
NareshGuntur
Partner - Specialist
Partner - Specialist

Try this

sum({<[Budget Month]={$(=GetFieldSelections([Forecast Month],',',100))}>}Budget)

100 should be atleast the number of distinct values in Forecast Month

Cheers,

Naresh

jonathandienst
Partner - Champion III
Partner - Champion III

Hi

Have you tried: sum({<[Budget Month] = P([Forecast Month])>} Budget)

HTH

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein