Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
markgraham123
Specialist
Specialist

Many to Many relationship

Hi,

I have the below data.

When i try to get data in table like,

W2  SUm(Qty)

i get error data when i drill down to SKU....It doesn't show individual SUm() but shows Total() as result in every field...

Can anyone help me

SKU     W1    Qty

1          a          234

2          b          4323

1          c          32

2          d          12

   

SKU         W2          Location

1          a                    22

2              b          324

1          c          4545

2          d          231

10 Replies
MK_QSL
MVP
MVP

Not clear from you description. Can you provide some more information... possibly what result you are looking for when you select any SKU?

Kushal_Chawda

try like this

LOAD *,SKU&W1 as Key Inline [

SKU ,    W1,    Qty

1,          a,          234

2,          b,          4323

1,          c,          32

2 ,         d,         12 ];

  

LOAD *,SKU1&W2  as Key Inline [

SKU1,         W2 ,         Location

1,          a ,           22

2,          b,           324

1,          c,          4545

2,          d,          231

markgraham123
Specialist
Specialist
Author

Hi,

But in my original application,

SKUK1&W2 is not unique.

markgraham123
Specialist
Specialist
Author

Hi Manish,

When i select SKU it should show the respective Sum...for the warehouse and sku.

But it shows the overall total sum.

Please have a look at the application i posted.

Kushal_Chawda

Then you need to find the columns(Combination of columns) which uniquely identifies the Row in both the table.

markgraham123
Specialist
Specialist
Author

THanq Kush..

I'm working on that

markgraham123
Specialist
Specialist
Author

Hi Kush,

I have thousands of rows after the combination of unique collumns,

Is there nay technique to check whether its unique or not...other than using frequency??

Kushal_Chawda

Suppose I have created the Key with combination of fields (A+B+C), so Count of key (Count(key)) should match with number of rows.

markgraham123
Specialist
Specialist
Author

hi Kush,

Sorry for too many questions...

Count(Key) should match with number of rows????

number of rows of what???

cna u pls lemme knw