Skip to main content
Announcements
Qlik Community Office Hours, March 20th. Former Talend Community users, ask your questions live. SIGN UP
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Particular Join between tables

Hello,

I've got a this one thing that I can't seem to tackle.

I've got two tables. One is a fact table, and the other is a dimension table.

I need to be able to flag quantities that do not meet the min order condition. The min values set for each material are found on the dimension table.

When I join then, I can't seem to get the minimal order quantity column next to each line of the fact table.

Here's the fact table:

Date                Mat             OrderQty     

12/01                A                     2

13/01                A                     1

14/01                A                    0,5

12/01                B                     1

13/01                B                     2

14/01                B                    0,8

12/01                C                    0,9

13/01                C                     2

14/01                C                     3

Here's the dimension table:

Mat                  Min Order

A                           0,6

B                           0,8

C                           0,9

Does anybody have any ideas on how to achieve this?

Thank you very much.

1 Solution

Accepted Solutions
PrashantSangle

Hi,

You script became,

Test

LOAD * INLINE [
Date, Mat,OrderQty     
12/01,A,2
13/01,A,1
14/01,A,0.5
12/01,B,1
13/01,B,2
14/01,B,0.8
12/01,C,0.9
13/01,C,2
14/01,C,3
];

join
LOAD * INLINE [
Mat,Min Order
A,0.6
B,0.8
C,0.9
];

then take table Box

add All 4 Field

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 🙂

View solution in original post

5 Replies
PrashantSangle

Hi,

USe Outer Join

like

Load *

from Fact_Table;

join

Load *

from Dimension_Table;

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 🙂
PrashantSangle

Hi,

You script became,

Test

LOAD * INLINE [
Date, Mat,OrderQty     
12/01,A,2
13/01,A,1
14/01,A,0.5
12/01,B,1
13/01,B,2
14/01,B,0.8
12/01,C,0.9
13/01,C,2
14/01,C,3
];

join
LOAD * INLINE [
Mat,Min Order
A,0.6
B,0.8
C,0.9
];

then take table Box

add All 4 Field

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 🙂
Not applicable
Author

Hi,

Try like this.

FactTable:

Load

       Date,         

       Mat  ,

       OrderQty 

from path ;

concatenate(FactTable)

Load

     Mat,            

     Min Order      as    OrderQty

from path;

               OR

FactTable:

Load

       Date,         

       Mat  ,

       OrderQty 

from path ;

left join(FactTable)

Load

     Mat,            

     Min Order    

from path;

sorrakis01
Specialist
Specialist

Hi,

The same of my collegues, but do you like this?

Regards

buzzy996
Master II
Master II

hopes ur looking for,

after loading ur data in qv,on table n expression tab u have to create one field,

for Flag and expression is

=If(Mat='A' and [Min Order]>='0.6','Met',

If(Mat='B' and [Min Order]>='0.8','Met',

If(Mat='C' and [Min Order]>='0.9','Met','Not Met')))