Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
louise119
Creator III
Creator III

GetSelectedCount

If you use getselectedcount it will be -1. What do you mean?

Expression; GetSelectedCount("=if(.......)")>0

1 Solution

Accepted Solutions
Chanty4u
MVP
MVP

GetSelectedCount() is used to determine the number of selected values in a field. The expression you provided includes a conditional statement using the IF() function, which will return a Boolean value (either True or False) depending on the result of the condition.

 

If the result of the condition is True, then the GetSelectedCount() function will be executed and its result will be compared to zero. If the result is greater than zero, then the entire expression will evaluate to True. Otherwise, it will evaluate to False.

 

However, if the condition in the IF() function is not met and returns False, the GetSelectedCount() function will not be executed, and the expression will return -1. This value indicates that the function could not be evaluated due to the condition being false.

 

Therefore, it is important to make sure that the condition in the IF() function is correctly formatted and will not result in a False output in order to prevent the GetSelectedCount() function from returning -1.

View solution in original post

2 Replies
Chanty4u
MVP
MVP

GetSelectedCount() is used to determine the number of selected values in a field. The expression you provided includes a conditional statement using the IF() function, which will return a Boolean value (either True or False) depending on the result of the condition.

 

If the result of the condition is True, then the GetSelectedCount() function will be executed and its result will be compared to zero. If the result is greater than zero, then the entire expression will evaluate to True. Otherwise, it will evaluate to False.

 

However, if the condition in the IF() function is not met and returns False, the GetSelectedCount() function will not be executed, and the expression will return -1. This value indicates that the function could not be evaluated due to the condition being false.

 

Therefore, it is important to make sure that the condition in the IF() function is correctly formatted and will not result in a False output in order to prevent the GetSelectedCount() function from returning -1.

louise119
Creator III
Creator III
Author

Thank you so much.
 I could solve the problem I have.

I appreciate for your kindness.