Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Not applicable

Getcurrentselections() in dimension

Hi all,

Can I use getcurrentselections() function in dimension?

I have used this function in measure and it works fine.

eg:

Count({<getcurrentselections() >}EmployeeID, to get the employee count

But If I want to get the list of employees in a table

{getcurrentselections()}Employee,

it doesn't work.

Any Ideas group?

Mike

14 Replies
vinieme12
Esteemed Contributor II

Re: Getcurrentselections() in dimension

Hi Mike,

Qlikview will automatically show only selected values of your Dimension ,

but if you have any expression that says to ignore selections in Employee list or Employee = {'*'} all your employees will be shown.

Can you post a sample ?

Re: Getcurrentselections() in dimension

I think getcurrentselections() isn't very suitable for using in set analysis - better would be getfieldselections() or something like concat() or p(). To create a valid calculated dimension you will need to wrap them with an aggr() function. Here you will find more about it: Calculated Dimensions.

- Marcus

Not applicable

Re: Getcurrentselections() in dimension

As Marcus mentioned, using concat with perhaps a variable trigger might do the trick.

Not applicable

Re: Getcurrentselections() in dimension

I have a survey with data like this

  

EmployeeQuestionAnswer
111
121
132
143
211
223
232
244
312
321
331
342
412
421
431
443

I have 4 employee, 4 questions with different answers

Chart 1: displays the data for Question 1

Chart 2: Displays the data for Question 2

I want to click on a response on chart 1, get a virtual list all the employee who chose Answer 1, reference the list of employees to filter Questions 2 to see what was these employees Answers for other questions.

Challenge: When I click on an the chart which displays Count(Answer) for Question 1, getcurrentselections & Getfieldselections would capture only Selected Answer. But what I need is the list of employees who selected this answer to reference it else where.

Not applicable

Re: Getcurrentselections() in dimension

I think P() / E() are only the functionalities of QlikView. I could't use these in Qlik sense.

oknotsen
Honored Contributor III

Re: Getcurrentselections() in dimension

Just checked the P() and E() function and they still work (version 2.2.4).

May you live in interesting times!
vinieme12
Esteemed Contributor II

Re: Getcurrentselections() in dimension

Use

count({<Question=>}Answer)

This will ignore your selections on the questions dimension

vinieme12
Esteemed Contributor II

Re: Getcurrentselections() in dimension

Can you post a snapshot of the chart?

vinieme12
Esteemed Contributor II

Re: Getcurrentselections() in dimension

Please see attached.

Also refer to the formulas in the text boxes, this should provide some insight on solving your problem.

survey.JPG

Community Browser