Qlik Community

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
QlikWorld 2022, LIVE in Denver CO., May 16-19, 2022. REGISTER NOW TO RECEIVE EARLY BIRD PRICING
cancel
Showing results for 
Search instead for 
Did you mean: 
Breezy
Creator
Creator

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
yko
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
yko
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

Breezy
Creator
Creator
Author

Yessssssssss. That worked! Thank you! 🙂

 

yko
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
Creator
Author

I'll take a look. Thanks!