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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Calculated Dimension

Hi guys

I am trying to create a calculated dimension that only looks at invoice numbers that aren't 8 digits in length and begin with the number 5.

I have the following but it doesn't work, there is an error with the "-=" operator. Do any of you clever folks have any suggestions how I can amend this to work?

IF(LEN([Invoice Number] -= "8" AND WildMatch([Invoice Number],'5*'),'Barcoded',)

Many thanks,

Gareth

1 Solution

Accepted Solutions
prieper
Master II
Master II

IF(LEN([Invoice Number] <> 8 AND WildMatch([Invoice Number],'5*'),'Barcoded')

edit: Typo

View solution in original post

6 Replies
Anonymous
Not applicable
Author

try this (only = instead of -=)

IF(LEN([Invoice Number] = "8" AND WildMatch([Invoice Number],'5*'),'Barcoded',)

devarasu07
Master II
Master II

Hi,

Try like this, if it's not working would be able to share your mock data and expected results tks

IF(LEN([Invoice Number]<>8 AND WildMatch([Invoice Number],'5*'),Barcoded)

or

aggr(IF(LEN([Invoice Number]<>8 AND WildMatch([Invoice Number],'5*'),Barcoded),Barcoded)

Thanks,Deva

prieper
Master II
Master II

IF(LEN([Invoice Number] <> 8 AND WildMatch([Invoice Number],'5*'),'Barcoded')

edit: Typo

Anonymous
Not applicable
Author

<> 8 for sure

tresesco
MVP
MVP

OR like:

IF( Not LEN([Invoice Number] = 8 AND WildMatch([Invoice Number],'5*'),'Barcoded')

Anonymous
Not applicable
Author

Thanks all