Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Many to Many relationship

Hi there,

I have two csv files

1. Customers activity

user_namegame_namedatestake
ABCGAME101/07/201310
DEFGAME201/07/201320
ABCGAME202/07/201315
ABCGAME303/07/201325

2. Customers campaings

user_namecampaing
ABC1
ABC2
ABC3
DEF1
DEF5

In my application I would like to choose campaing from a list and see customers activity.

How to avoid many to many relationship in that case?

Thanks

1 Solution

Accepted Solutions
jagan
Partner - Champion III
Partner - Champion III

HI,

Try this script,

Table1:

LOAD

*

FROM Customersactivity;

Table2:

LOAD

*

FROM Customerscampaings;

Table3:

LOAD

     DISTINCT user_name

RESIDENT Customersactivity;

Hope this helps you.

Regards,

Jagan.

View solution in original post

4 Replies
jagan
Partner - Champion III
Partner - Champion III

HI,

Try this script,

Table1:

LOAD

*

FROM Customersactivity;

Table2:

LOAD

*

FROM Customerscampaings;

Table3:

LOAD

     DISTINCT user_name

RESIDENT Customersactivity;

Hope this helps you.

Regards,

Jagan.

Not applicable
Author

It helped. Thanks. Can you please explain how it works?

jagan
Partner - Champion III
Partner - Champion III

HI,

Here we are arriving a new table, so that the existing tables join with this table, the new table has distinct user_name so we there is no many many relationship between the tables.

Regards,

Jagan.

omerfaruk
Creator
Creator

Hi Jagan,

Aren't these tables associated to each other over user_name? Doesn't that still cause a many to many relation?

I tried the similar scenario on my model, it looks it didn't resolve. Am I missing sth ?

Thanks.