Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
vipingarg23
Creator
Creator

getfieldslection with multiple field in qlikview

Hi Team,

Please find the sample file as an attachment.

I want, if I select any value for city, that value should not appear in bar chart.

It is working fine with one value but doesn't work if I select multiple value from city.

Can anyone help me on the same?

9 Replies
Anil_Babu_Samineni

Use this?

sum( {$<City = e({$<City={$(=Concat(Chr(39) & City & Chr(39), ','))}>} City)>} Sales )

Please add me Anil_Babu_Samineni to interact faster when reply back. Speak low think High.

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
vipingarg23
Creator
Creator
Author

Great Anil,

It is working fine. Just one more question...Can we implement the same from getfieldselections() by any other way?

sunny_talwar

Why can't you just use this?

Sum({$<City = e(City)>} Sales)

vipingarg23
Creator
Creator
Author

Hi Sunny,

Thanks..But I want to know that can we use getfieldselections() inside set

analysis in case of multiple selections. If yes then how?

On Thu, Apr 19, 2018 at 7:12 PM, Sunny Talwar <qcwebmaster@qlikview.com>

cheenu_janakira
Creator III
Creator III

I think you are looking for a solution somewhere based on Anil's:

sum( {$<City = e({$<City={$(=CHR(39) & GetFieldSelections(City, CHR(39) & ',' & CHR(39)) & CHR(39))}>} City)>} Sales )

even though Sunny gave you the simplest form.

Cheerio

sunny_talwar

You can, but I wonder why you want to make your expression complex?

cheenu_janakira
Creator III
Creator III

I know. Your guess as good as mine. For "learning" purposes, future reference?

vipingarg23
Creator
Creator
Author

You are absolutely right...

sunny_talwar

okay