Qlik Community

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
IMPORTANT security patches for GeoAnalytics Server available to download: READ DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
adwitiya
Creator
Creator

Using GetFieldSelections in set analysis

Hi All,

I have a dashboard with [Month] as a filter. Only one value for [Month] can be selected at a time.

I'm using the code:

sum({<TransitionMonth=${"=GetFieldSelections(Month)"} , Version={'ABC'}>}Value)

and with 'Aug' filtered for [Month], I'm getting the 4th column in the below table:

set analysis.PNG

What I need is for each row to give me the value of 2.2, since that is value for [TransitionMonth]=[Month]=Aug.

What am I doing wrong?

1 Solution

Accepted Solutions
adwitiya
Creator
Creator
Author

This worked!

sum(total{<TransitionMonth={'$(=getfieldselections(Month))'} , Version={'1YP'}>}Inflows)*change/100


It was missing a TOTAL function

View solution in original post

18 Replies
YoussefBelloum
Champion
Champion

Hi,

try this:

sum({<TransitionMonth={'$(=getfieldselections(Month))'}>} , Version={'ABC'}>}Value)


adwitiya
Creator
Creator
Author

It displays null.

OmarBenSalem
Partner
Partner

Try :

sum({<TransitionMonth={"$(=concat(Month,'","'))"}>} , Version={'ABC'}>}Value)


YoussefBelloum
Champion
Champion

My bad, it was a mistake, try this:


sum({<TransitionMonth={'$(=getfieldselections(Month))'} , Version={'ABC'}>}Value)

OmarBenSalem
Partner
Partner

Didn't pay attention to the "one month selection part" ;

But even in this case, with concat it should work for one or different Months selection while I'm not that sure It would work with GetFieldSelections(Month) if more than one month is selected..

adwitiya
Creator
Creator
Author

Youssef, This gives '2.2' for Aug, but zero for all other months.

YoussefBelloum
Champion
Champion

Yes that's why I removed my comment, because when I use CONCAT it's often when I select multiple values.

#مريجل صاحبي

YoussefBelloum
Champion
Champion

check suppress when null in "complement"

adwitiya
Creator
Creator
Author

Is there a way to do it without using GetFieldSelections?