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

Data source

Hi all,

I'm building up several dashboards in one qvw file. For one of them, I'm using dataset A, but for the other ones, I'm using dataset B. Just wondering whether there is a way to specify which dashboard is using which dataset in script, please?

Many thanks,

Grace

8 Replies
giakoum
Partner - Master II
Partner - Master II

You can use alternate states for that so every dashboard (I guess you mean a sheet with charts on it by dashboard) is on a different state. But generally, if you have 4 completely different data models, then you should definitely separate them in separate qvw

Not applicable
Author

Hi loannis,

Thank you very much for your reply. However, this is not what I mean. Why I was asking this is that I'm actually using two similar datasets but with one of them (dataset B) I'm going to do CrossTable before it can be used for one of the dashboards. So that for this particular one, most of the field names are the same as the other dataset (dataset A). However, since the CrossTable is going to double count the other fields which may mess up the other dashboards which are using dataset A. So I'm wondering whether there is a way to say that dataset B is only used by that specific dashboard but all the other dashboards are using dataset A?

Many thanks,

Grace

giakoum
Partner - Master II
Partner - Master II

there is no good way to do that, unless you completely split the two tables (no links between them or between the dimensions) and use alternate states in your front end. Totally not recommended though.

Why do you try to concatenate the 2 into one?

Not applicable
Author

Because I want to keep all the dashboards in one qvw file. Or shall I change the field names in one of the datasets?

giakoum
Partner - Master II
Partner - Master II

no need to. concatenate means creating one table out of two. There is no need to change names in columns. QlikView will put same name columns together and the rest with null values were no common column name exists. For example

Table 1

columns A, B

Table 2

columns A, C

if you concatenate, the result will be :

Table 3

columns A, B, C

with null values in column C for table 1 rows and with null values in column B for table 2 rows

Concatenate

If two tables that are to be concatenated have different sets of Fields, Concatenation of two tables can still be forced with the Concatenate prefix. This statement forces concatenation with an existing named table or the latest previously created Logical Table. A concatenation is in principle the same as the SQL UNION statement, but with two differences: first that Concatenate prefix can be used no matter if the tables have identical field names or not; and secondly that no removal of identical records are made.

The syntax is:

concatenate [ (tablename ) ] ( loadstatement | selectstatement )

Examples:

Concatenate LOAD* FROM file2.csv;

Concatenate SQL SELECT * FROM table3;

tab1:

Load * from file1.csv;

tab2:

load * from file2.csv;

.. .. ..

Concatenate (tab1) load * from file3.csv;

giakoum
Partner - Master II
Partner - Master II

a sample app would help

Not applicable
Author

Thank you Ioannis. But I can't see why concatenate will help in my case?

Not applicable
Author

CrossTable function will change the dataset structure and that's why I can't just simply use only one dataset.

Please find attached my sample tables. So in principle, I want to use the top table for most of my dashboards, but the bottom table (after CrossTable) for only one of the dashboards. For the only one dashboard, I'm plotting Development against DevPeriod for each UWYear. However, if I use the bottom table for other dashboards, all the other fields eg sales and countries will be multi-counted for every UWYear.