Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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?
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
try this
sum({$<[Employee ID]={"*"} - {'0123456789*'}>}[Total Net paid])
May be this:
Sum({$<[Employee ID] = {"=IsText([Employee ID])"}>}[Total Net paid])
Thanks everyone. I figured that this worked:
sum({$<[Employee ID]-={'>0'}>}[Total Net paid])
I'll try your suggestions later.
Yeah it works! Thank you Sunny T!