5 Replies Latest reply: Aug 10, 2016 1:04 AM by jade wind

# 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?

• ###### 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

• ###### 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])

• ###### Re: Set analysis - not a number

Yeah it works! Thank you Sunny T!

• ###### Re: Set analysis - not a number

Thanks everyone. I figured that this worked:

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