7 Replies Latest reply: Jul 21, 2009 4:20 PM by -Pjotr- RSS

    Avoiding sync tables

      Hi,

      A general question, regarding sync tables. I´m basicaly trying to create a "global variable". So if I have a table with customer information and another one with item information, and i would like to have both of those lists available for two or more tables(Like sales kpi) in pretty much the fashion displayed below (don´t ask why i would want to use these values, they are just for illustration).

      Sales

      / \
      Customer Items

      \ /

      Purchasing

      Normally if you do this, Qlikview makes a synthetic keys for these. I´ve naming the fields differently ( as customer1, customer2...) which makes a loop in the datamodel. And joining the sales and purchacing tables so that only one link would be needed doesn´t seem to work...

      If there´s anyone with any ideas, I would gladly welcome them.

        • Avoiding sync tables
          ewasserman

          You can avoid looping the datamodel by using "qualify", and "unqualify" to make sure field names are different except those you "unqualify".

          You would load the needed tables more than once (once for each table where you need the associated to), with different column names. You will specify how they link (to the sales table for example) by controling the field names.

          Let me know if this makes sense. I can add an example if needed.

          • Avoiding sync tables
            Michael Solomovich

            Pjotr,
            Concatenate Sales and Purchasing instead of join.
            Another approach - create a key field in Sales and Purchasing Customer&Item (you can miminize it later if needed), and a link table containing Customer, Item, and Customer&Item. This way you'll get a more complex data model, that is slower calculations. I'd recommend the first one.

            • Avoiding sync tables

              I would suggest 'Concatenate' statement in your script...

              Regards

              Eraaj