8 Replies Latest reply: Aug 29, 2014 11:19 AM by Grace Xia RSS

    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,



        • Re: Data source
          ioannis giakoumakis

          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

            • Re: Data source

              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,



                • Re: Data source
                  ioannis giakoumakis

                  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?

                    • Re: Data source

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

                        • Re: Data source
                          ioannis giakoumakis

                          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



                          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 )


                          Concatenate LOAD* FROM file2.csv;

                          Concatenate SQL SELECT * FROM table3;


                          Load * from file1.csv;


                          load * from file2.csv;

                          .. .. ..

                          Concatenate (tab1) load * from file3.csv;

                          • Re: Data source
                            ioannis giakoumakis

                            a sample app would help

                              • Re: Data source

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

                                • Re: Re: Data source

                                  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.