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

Match not working

Hi,

I have issue with the not match below :

Part of the script to filter out TrasnportMode = A and V as below :

[StatusC]:

load OMSPO#,

MIN(date(TransmDate)) as TransmDateC ,

MIN(date(StatusDate)) as StatusDateC ,

MIN(date(StatusDate) )- MIN(date(TransmDate) )as DayDiffC

//if (min(date(StatusDate)) - min(date(TransmDate))<= '2','Y','N') as TargetC

resident [Shipment]

WHERE not match(TransportMode,'B','V') AND  trackCode ='BOOKCONFRE'

Group by OMSPO#

Order by StatusDate,TransmDate;

The result still how V in TransportMode but the trackCode filter worked.

   

OMSPO#TransmDatetrackCodestatusCodeTransportModeStatusDateC
5NG09711/12/2015BOOKCONFRE400V-
5NG10002/12/2015BOOKCONFRE400V-
5NG10102/12/2015BOOKCONFRE400V-
5NG10202/12/2015BOOKCONFRE400V-
5NG10911/12/2015BOOKCONFRE400V-
5NG11011/12/2015BOOKCONFRE400V-
15N04202/12/2015BOOKCONFRE400V-
15N04309/12/2015BOOKCONFRE400V-

Appreciate anyone could help.

Thank you.

Andros_Goh

5 Replies
Not applicable
Author

Hi Andros



try this with small change


i think you need to write like this



WHERE not match(TransportMode,'B','V') AND  match(trackCode ,'BOOKCONFRE')

martinpohl
Partner - Master
Partner - Master

Hello,

what is the data structure after load?

Did you drop the Shipment table?

The tablebox shows all fields from all tables.

It seems ok that the fields

OMSPO#TransmDatetrackCodestatusCode

TransportMode

are in table Shipment and there are no StatusDateC because they don't match.

Regards

Kushal_Chawda

try this

[StatusC]:

load OMSPO#,

MIN(date(TransmDate)) as TransmDateC ,

MIN(date(StatusDate)) as StatusDateC ,

MIN(date(StatusDate) )- MIN(date(TransmDate) )as DayDiffC

//if (min(date(StatusDate)) - min(date(TransmDate))<= '2','Y','N') as TargetC

resident [Shipment]

WHERE not match(lower(trim(TransportMode)),'b','v') AND  trackCode ='BOOKCONFRE'

Group by OMSPO#

Order by StatusDate,TransmDate;

tresesco
MVP
MVP

There could be a space issue. Try like:

WHERE not match(Trim(TransportMode),'B','V') AND  trackCode ='BOOKCONFRE'

sunny_talwar

or this:

Where not WildMatch(TransportMode,'*B*','*V*') and WildMatch(trackCode, '*BOOKCONFRE*';