Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

jasmina_karcic
Contributor II

making model of data with lib connection and other source

Hi everyone,

I made one model of data, and after I want use the same model for another application.

Because of that, I am thinking that I don't need a new model, that I can use first model on way I put lib connection:

Binary 'lib://QVF (xxx_xxx.xxx)/E941BCB6-8F44-46B2-8657-82754CA6B42D';

But, now I need a new table to import in this model.

How can I make this?

I was trying to make:

1. section: Binary 'lib://QVF (xxx_xxx.xxx)/E941BCB6-8F44-46B2-8657-82754CA6B42D';

2. section: 

LOAD

    A,

    B,

    C,

    OPIS_U_REDU,

    DATUM,

    IZNOS

FROM [lib://folder_E_Qlik_Qliksense (xxxx_xxx.xxx)/table.xlsx]

(ooxml, embedded labels, table is Sheet1);

After this I got message:

circular_reference.png

Anyone has a solution?

Thanks

7 Replies
facettti
New Contributor II

Re: making model of data with lib connection and other source

Hello Jasmina

Go to data model section in Qlik Sense and identify which tables and fields are causing it.

You can find out more about circular references here:

https://help.qlik.com/en-US/sense/June2018/Subsystems/Hub/Content/LoadData/understand-circular-refer...

Possible solution:

Usually renaming the field(s) in the load script  which  cause circular reference is the  simplest.

Peter

MVP
MVP

Re: making model of data with lib connection and other source

Two (or more) of your fields in your additional table has the same name as two (or more) fields from different tables in your binary data model. So it forms a circular reference. Find out which of the fields that cause the problem by lookinging in the data model viewer.

Often the problem can be handled by renaming one of the fields in your new table.

If you want additional help please provide a screenshot of your data model from the data model viewer.

jasmina_karcic
Contributor II

Re: making model of data with lib connection and other source

In first model I have one table:

Table1:

A_NAME,

B_NUMBER_NAME,

C_DATE,

D_VALUE1

......(other columns)

In table that I want add I have:

A_NAME,

B_NUMBER_NAME,

C_DATE

D_VALUE2,

....(other columns)

I need to create table that has:

A_NAME,

B_NUMBER_NAME,

C_DATE,

D_VALUE1,

D_VALUE2

I've done what you told me, I changed names of fields, but now in front, when I want make a together table, I have a problem.

They don't recognise the same value as a together field, because I changed names.

jasmina_karcic
Contributor II

Re: making model of data with lib connection and other source

Can you look my comment down?

Thanksss

jasmina_karcic
Contributor II

Re: making model of data with lib connection and other source

I've done that, but after than in using in application I don't have connection with other table.

:/ What can I do?

Look my comment down, please

MVP
MVP

Re: making model of data with lib connection and other source

What you need to do is to enable auto concatenation or do a forced concatenation of the tables in question.

     The general help:

     https://help.qlik.com/en-US/sense/June2018/Subsystems/Hub/Content/LoadData/concatenate-tables.htm

     The syntax of the concatenate clause:

     https://help.qlik.com/en-US/sense/June2018/Subsystems/Hub/Content/Scripting/ScriptPrefixes/conc...

The simplest is probably forced concatenation of the tables.

You can do that by:

1) loading the first table as you have done already.

2) putting a CONCATENATE in front of every LOAD of the tables you want to add to the first table. This will force Qlik to add this tables to the first table and add the new fields into the resulting table which will be just one table named what you called the initial table.

The code would be something like this:

Table1:

LOAD

  .....

  .....;

CONCATENATE (Table1) LOAD    // the (Table1) can be left out if the loads are following each other

.....

.....;

CONCATENATE (Table1) LOAD   // the (Table1) can be left out if the loads are following each other

.....

.....;

jasmina_karcic
Contributor II

Re: making model of data with lib connection and other source

Thank you very much, I will try this. I have a huge number of data...and many tables...

Good luck to everyone...