Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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 ?
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
As Marcus mentioned, using concat with perhaps a variable trigger might do the trick.
I have a survey with data like this
Employee | Question | Answer |
---|---|---|
1 | 1 | 1 |
1 | 2 | 1 |
1 | 3 | 2 |
1 | 4 | 3 |
2 | 1 | 1 |
2 | 2 | 3 |
2 | 3 | 2 |
2 | 4 | 4 |
3 | 1 | 2 |
3 | 2 | 1 |
3 | 3 | 1 |
3 | 4 | 2 |
4 | 1 | 2 |
4 | 2 | 1 |
4 | 3 | 1 |
4 | 4 | 3 |
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.
I think P() / E() are only the functionalities of QlikView. I could't use these in Qlik sense.
Just checked the P() and E() function and they still work (version 2.2.4).
Use
count({<Question=>}Answer)
This will ignore your selections on the questions dimension
Can you post a snapshot of the chart?
Please see attached.
Also refer to the formulas in the text boxes, this should provide some insight on solving your problem.