Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

2 sheets with same table dimension

Hi,

I'm new for QlikView. I have 2 sheets in .qvw file and some table in this 2 sheet use the same data for dimension (such as Country).

In the edit script, Do I have to write a load script one time and use this for 2 sheets or seperate load script for each sheet. Which way is better?

Please suggest. Thank.

7 Replies
Anonymous
Not applicable
Author

I don't see any reason to load it twice.

IAMDV
Luminary Alumni
Luminary Alumni

As mentioned by Dennis please don't load the data twice. QV will access the data from the memory and you can use one table multiple times. If you load the data twice QV will perform auto concatenation assuming the field names are same. This means you are duplicating the data, although QV will only show the distinct values but your aggregations will be incorrect.

Here is simple example on what happens if you load the data multiple times. Please look the frequency numbers in the ListBox object.

I hope this makes sense.

Cheers,

DV

www.QlikShare.com

Not applicable
Author

Thank Dennis . Refer to the question, here is some script.

LOAD A_CountryCode,

     A_CountryName;

SQL SELECT CountryCode as A_CountryCode,

    CountryName as A_CountryName   

FROM "Country_Dim";

LOAD B_CountryCode,

     B_CountryNamel;

SQL SELECT CountryCode as B_CountryCode,

    CountryName as B_CountryName  

FROM "Country_Dim";

First load is use for sheet A and the second is for sheet B. Is this effect performance or make it slow ? Is it should be only one load right ?

Please help suggest. Thank .

IAMDV
Luminary Alumni
Luminary Alumni

Your script will create Data Islands although you might not notice the performance difference by this approach but its not recommended to load the data twice unless you have unique requirement.

This is enough and you can use the same dataset in multiple sheets. If you want to override the current selection in your charts then please use Set Analysis within your expressions.

LOAD A_CountryCode,

     A_CountryName;

SQL SELECT CountryCode as A_CountryCode,

    CountryName as A_CountryName   

FROM "Country_Dim";

I hope this helps.

Cheers,

DV

jagannalla
Partner - Specialist III
Partner - Specialist III

Hello,

Yes Deepak is right.Nothing will happen to qlikview, only the size of qvw file will increase. If you want to seperate fields for each sheet wise i recommend you to use below code b'coz you doesn't require to retrieve data from sql again and again. Once the data of field is loaded you can rename it with resident load.


Sheet1:

LOAD A_CountryCode,

     A_CountryName;

SQL SELECT CountryCode as A_CountryCode,

    CountryName as A_CountryName   

FROM "Country_Dim";

Sheet2:

LOAD A_CountryCode as B_CountryCode,

     A_CountryName as B_CountryName

Resident Sheet1;

Not applicable
Author

Thank you so much all of you. 

Not applicable
Author

Hi,

You should load it once through load script and in front end you can show it any number of times.

Don't consider different sheets in Qlikview as they contain different data, in Qlikview there is a common data layer which is shared across the sheets/objects etc.

So, if you load a field named A then you can use this field in the same document across all the sheets.

I believe you are having this confusion as you are considering different sheets to have different data.

And, even if you want to achieve in these 2 sheets different selection states for the same field that can be achieved using alternate states from version 11.

So, there is no need at all in any case for loading the same data twice.

..

Ashutosh Paliwal