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

Circular Reference

Dear Experts,

Suppose I have 3 tables which are making circular reference.

Orders

---------------------------

OrderId

siteId

OrderLines

---------------------------

OrderId

ItemId

Discounts

---------------------------

siteid

ItemId

Discount

Now Discounts table have to be joined with both tables Orders and OrderLines and Orders and OrderLines should also join. i want to keep all 3 tables. and want to get discount based on siteid and itemid.

Regards,

Zahid Rahim

1 Reply
devarasu07
Master II
Master II

Hi,

Try below methods

Method 1:

By renaming column name siteId from Dsicount table.

Method 2: by using join

Orders:

LOAD * INLINE [

    OrderId, siteId

    100, 1

    101, 2

    103, 3

];

inner join (Orders)

LOAD * INLINE [

    OrderId, ItemId

    100, 200

    101, 300

    103, 400

];

Inner Join(Orders)

LOAD * INLINE [

    siteId, ItemId, Discount

    1, 200, 15

    2, 300, 20

    3, 400, 30

];