Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Wildcard Match via Inner Join?

Hi All,

I have the following table of Orders.

Ref               Type          Units         

Order1          Drill               10

Order2          CNC              20

Order3          Drill               15

I also have a table of Complete Production.

Ref                Station         

Order1           31

Order2           41   

I have some rules.

Type               Station

Drill                 31

CNC               41

I need to have one table as below that loads the orders, but sets the units to 0 where a valid entry for a station is found against the order.

So my final table would be

Ref               Type          Units         

Order1          Drill               0

Order2          CNC              0

Order3          Drill               15

I'm trying to use an inner join, with a wildcard match but not having much joy.

Any help gratefully received.

Thanks

Steve

1 Solution

Accepted Solutions
Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

You can load 2 Mapping tables from "Complete Product" and "Rules". The first table maps Orders to Stations, and the second table maps Types to Stations.

Then, load your transactions and compare the end results of the two maps:

LOAD

     Ref,

     Type,

     IF( ApplyMap('Map1', Ref) = ApplyMap('Map2', Type), 0,  Units ) as Units

RESIDENT

...

cheers,

Oleg Troyansky

www.masterssummit.com - take your QlikView skills to the next level!  

View solution in original post

2 Replies
Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

You can load 2 Mapping tables from "Complete Product" and "Rules". The first table maps Orders to Stations, and the second table maps Types to Stations.

Then, load your transactions and compare the end results of the two maps:

LOAD

     Ref,

     Type,

     IF( ApplyMap('Map1', Ref) = ApplyMap('Map2', Type), 0,  Units ) as Units

RESIDENT

...

cheers,

Oleg Troyansky

www.masterssummit.com - take your QlikView skills to the next level!  

Not applicable
Author

Thanks for the ideas.

Regards

Steve