Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

not getting the intended count

 

if

(CaseAge='>30',
Count(if(Interval(DATE((date(Today(),'DD/MM/YYYY')-date(INCIDENT_DATE,'DD/MM/YYYY')),'DD/MM/YYYY'),'DD')>30
AND NOT STATUS_DESC='Resolved'AND NOT STATUS_DESC='Cancelled' AND CLASS_DESC='Incident' and
WildMatch(REGION,'*EAST*') AND
NOT WildMatch(UPPER(CUSTOMER_NAME),'*ERICSSON*','*ERRICSSON*','*NOKIA*','HUTCHISON*','3*')AND
NOT INCIDENT_QUAL_STATUS='Disapproved'
AND NOT INCIDENT_PRIORITY='P5-Business Request'
AND NOT PRODUCT_AREA3=('Modem'OR 'Network Terminal') ,IN_INCIDENT_NO))

the actual count i should be getting is much lesser than the count that is been given by the above expression, please suggest if there is some problem in the code...

4 Replies
srchilukoori
Specialist
Specialist

Use the wildmatch as shown below, which ever matches your requirement. Wildmatch returns the position of the <Data1> in the <Fieldname>. If this equals to 0, it means <Data1> is not part of the string in <Fieldname>.

Wildmatch(<fieldname>, <Data1>, <Data2>,...) <> 0 or

Wildmatch(<fieldname>, <Data1>, <Data2>,...) =0

Not applicable
Author

there multiple values of the region and customer_name...can do that way...please suggest if there is any other approach,

the problem is with the the difference of date which is i guess causing problems..


srchilukoori
Specialist
Specialist

upload a sample qvw.

jonathandienst
Partner - Champion III
Partner - Champion III

Hi

I have rewritten the query and simplified it. There was an error in the query you posted (for PRODUCT_AREA3). This query is technically correct, but you should check to see if it means your requirements

If(CaseAge = '>30',

  Count(

  If(Today - INCIDENT_DATE > 30)

  AND WildMatch(STATUS_DESC, 'Resolved', 'Cancelled') = 0

  AND CLASS_DESC='Incident'

  AND WildMatch(REGION, '*EAST*')

  AND WildMatch(CUSTOMER_NAME, '*ERICSSON*', '*ERRICSSON*', '*NOKIA*', 'HUTCHISON*', '3*') = 0

  AND INCIDENT_QUAL_STATUS <> 'Disapproved'

  AND INCIDENT_PRIORITY <> 'P5-Business Request'

  AND WildMatch(PRODUCT_AREA3, 'Modem', 'Network Terminal') = 0,

  IN_INCIDENT_NO)

)

Note that you don't need all that decoration around the data comparison.

Regards

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein