Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

test if anything is selected

Hi

I need to set a condition: if anything is selected in the field, than 1, else 0.

There's a function GetSelectedCount(FieldName), so I may use it: if GetSelectedCount(FieldName)>0...

But is there a simpler and a more efficient way to solve my task?

Actually I don't need to count the exact number of selected values, I just need to know if anything at all has been selected in a field.

1 Solution

Accepted Solutions
MarcoWedel

Hi,

you don't have to compare with >0.

If(GetSelectedCount(FieldName), dosomething, doanotherthing)

is sufficient, as all values other than 0 are treated as true.

regards

Marco

View solution in original post

3 Replies
MarcoWedel

Hi,

you don't have to compare with >0.

If(GetSelectedCount(FieldName), dosomething, doanotherthing)

is sufficient, as all values other than 0 are treated as true.

regards

Marco

Anonymous
Not applicable
Author

Thank you!

MarcoWedel

You're welcome

Regards

Marco