Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
prayner
Contributor III
Contributor III

Counting values based on logical functions (e.g., IsNum())

Using the following set analysis code, I am trying to count the number of distinct locations where the field 'value' does not have numeric values:

Count(${<[IsNum(value)] = {'0'}>} distinct location)

Whether I enter '0' or '-1', I get the same output. How can I fix the syntax to get this to work?

Ref:

https://help.qlik.com/en-US/sense/February2023/Subsystems/Hub/Content/Sense_Hub/Scripting/LogicalFun...

 

Labels (2)
4 Replies
sandeep-singh
Creator II
Creator II

you can try this

Count({<Not IsNum(value)>} DISTINCT location)

prayner
Contributor III
Contributor III
Author

Error in expression
Error in set modifier expression

Kushal_Chawda

@prayner  try below

Count(${<location = {"=isnum(value)"}>} distinct location)
Kushal_Chawda

@prayner  if you have multiple lines for location. then use primary key in set. If you don't have primary key, create it using Rowno() function in the script for that table

Count(${<PrimaryKey = {"=isnum(value)"}>} distinct location)