Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Not applicable

Can GetFieldSelections() be used as a dimension?

Hi,

I am trying to use GetFieldSelections() to build a dimension, however it only works when Selection=1. Is there a way use it as a list of selected values?

I mean in a text box it works fine and it gives me a list of all values selected.

Any ideas?

Regards

Rahul

1 Solution

Accepted Solutions
swuehl
Not applicable

Re: Can GetFieldSelections() be used as a dimension?

I am unsure what you want to achieve, could you describe your requirements for the final chart?

maybe like attached?

8 Replies
Not applicable

Re: Can GetFieldSelections() be used as a dimension?

you need to post a sample qvw fileSmiley Happy

Not applicable

Re: Can GetFieldSelections() be used as a dimension?

Not that I have found, I spent quite a while working on this, you can't make a clickable dimension out of it.

Not applicable

Re: Can GetFieldSelections() be used as a dimension?

Dear Pari,

Please find QVW atttached.

Regards

R

swuehl
Not applicable

Re: Can GetFieldSelections() be used as a dimension?

Use set analysis with implicite field value definitions ( p() and e() functions) instead.

Something like:

=sum({<Employees=p()>}Sales)

=sum({<Employees=e()>} Sales)

edit:

and here is how you can create a synthetic dimension from your Fieldselections (if absoultely needed)

Not applicable

Re: Can GetFieldSelections() be used as a dimension?

Thanks Swuehl, i tried using the following as a dimension:

= if(Fruit= valuelist($(vFruitSelection2)),'Test','Control')

However it only gives me Test as a dimension. Do you see any reason why?

Please help!

Regards

Rahul

dennisnet
Not applicable

Re: Can GetFieldSelections() be used as a dimension?

Not exacly what you are looking for, but a workaround to get the same result is to get a trigger on the field Fruit

(Settings >> document properties >> Triggers : Field Event Trigger)

And add here an action Select Excluded on the field Fruit.

swuehl
Not applicable

Re: Can GetFieldSelections() be used as a dimension?

I am unsure what you want to achieve, could you describe your requirements for the final chart?

maybe like attached?

Not applicable

Re: Can GetFieldSelections() be used as a dimension?

Thanks Stefan, i got the view i wanted. The following is what i used for the dimension:

aggr (if(sum({<Fruit=e()>}sales)>0,'Control',if(sum(if( valuelist($(vFruitSelection2)) = Fruit, sales) )>0,'Test')),Fruit)

Regards

Rahul