Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

jadewind
Contributor

Set analysis - not a number

Hi everyone,

How can I put the condition of "not a number" in a set analysis expression? For example: in below set analysis expression where all Employee IDs are included, I want to change it to only where the Employee ID is not a number (or is a number then I can work out the other way round). (Where the Employee ID is not a number, the values can be a string or blank or some symbols. )

sum({$<[Employee ID]={"*"}>}[Total Net paid])

Any suggestions?

Tags (1)
5 Replies
guruprem
Contributor III

Re: Set analysis - not a number

You can use a purgechar/keepchar function in script to get the a flag like below

IF ( LEN( purgechar([Employee ID],'0123456789' ) ) > 0 , 1, 0 ) as isEmpwithChar

Then you can use this flag in Measure calculation

arulsettu
Honored Contributor III

Re: Set analysis - not a number

try this

sum({$<[Employee ID]={"*"} - {'0123456789*'}>}[Total Net paid])



Re: Set analysis - not a number

May be this:

Sum({$<[Employee ID] = {"=IsText([Employee ID])"}>}[Total Net paid])

jadewind
Contributor

Re: Set analysis - not a number

Thanks everyone. I figured that this worked:

sum({$<[Employee ID]-={'>0'}>}[Total Net paid])

I'll try your suggestions later.

jadewind
Contributor

Re: Set analysis - not a number

Yeah it works! Thank you Sunny T!

Community Browser