Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

set analysis calculate wrong values for a field

Hello,

The values of the  field  "execution venue code " must be like this ---> (Normal type) :

MIC – XXXX (4 letters characters) or INT – XXXX (4 numerous characters)

I would like calculate the number of wrong values for the thield( execution venue code ) -> which does not correspond to the normal type.

To calculate the number of values does not starting by "INT-" and  "MIC-"  this expression is working :

count( {1< EXECUTION_VENUE_CODE = {'*'}-{'INT-*', 'MIC-*'} >} EXECUTION_VENUE_CODE)

Now, i want calculate in the same expression the values  having more than 8 characters

My question : how i can improve this expression to calculate the number of values having more than 8 caracters ?

NB : to calcluate the number of values for the field having more than 8 characters may be done like this :

 

Count( if (Len(EXECUTION_VENUE_CODE)>8, EXECUTION_VENUE_CODE))

Thanks in advance,

Regards,

1 Solution

Accepted Solutions
Not applicable
Author

Hello,

Thank you very much for your answers.

you gave me the idea. So the correct expression is :

 

= count(if (not wildmatch(EXECUTION_VENUE_CODE,'INT-????','MIC-????'),EXECUTION_VENUE_CODE ))

Thanks again

View solution in original post

5 Replies
Mark_Little
Luminary
Luminary

Hi,

I would do this in script, create flag.

if (Len(EXECUTION_VENUE_CODE)>8, 1,0) as LengthFlag


Then

Count({<LengthFlag={1}>}EXECUTION_VENUE_CODE)


Mark

Not applicable
Author

can u pls give the sample data

PrashantSangle

Hi,

try like

Count(if(len(Execution_Venue_code)>8 and not wildmatch(Execution_Venue_code,'INT-*','MIC-*'),Execution_Venue_code))

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
tresesco
MVP
MVP

Try like:

count( {1< EXECUTION_VENUE_CODE = {'*'}-{'INT-*', 'MIC-*'} > - < EXECUTION_VENUE_CODE = {"=Len(EXECUTION_VENUE_CODE)<=8"} >} EXECUTION_VENUE_CODE)

Not applicable
Author

Hello,

Thank you very much for your answers.

you gave me the idea. So the correct expression is :

 

= count(if (not wildmatch(EXECUTION_VENUE_CODE,'INT-????','MIC-????'),EXECUTION_VENUE_CODE ))

Thanks again