Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Breezy
Creator II
Creator II

GetCurrentSelection does not work properly

Hi,

This is my first time using the "GetCurrentSelections" function. In my first two examples it appears to work how I want it to work. However, in my third example of my KPI , when I choose two people from "FirstName", it just gives me a dash line instead of the two people! How do I resolve this? It should say "Matt, Linda."

 

QlikKPI_Name_Example.JPG

Labels (1)
1 Solution

Accepted Solutions
Øystein_Kolsrud
Employee
Employee

You're referring directly to the field "FirstName" in the first condition of your if-statement. I suspect you need to aggregate that values of that field somehow, probably like this:

=if(Count(GetCurrentSelections()) > 0, Concat(Distinct FirstName, ', '), 'Please select a name')

 

View solution in original post

4 Replies
Øystein_Kolsrud
Employee
Employee

You're referring directly to the field "FirstName" in the first condition of your if-statement. I suspect you need to aggregate that values of that field somehow, probably like this:

=if(Count(GetCurrentSelections()) > 0, Concat(Distinct FirstName, ', '), 'Please select a name')

 

Breezy
Creator II
Creator II
Author

Yessssssssss. That worked! Thank you! 🙂

 

Øystein_Kolsrud
Employee
Employee

Good! But you might want to have a look at this function:

https://help.qlik.com/en-US/sense/November2021/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/Field...

It allows you to show only the selected values in a specific field.

Breezy
Creator II
Creator II
Author

I'll take a look. Thanks!