21.01.2013 Views

QlikView Reference Manual.pdf - QlikCommunity - QlikView

QlikView Reference Manual.pdf - QlikCommunity - QlikView

QlikView Reference Manual.pdf - QlikCommunity - QlikView

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

and an error message will appear. After each reload, <strong>QlikView</strong> will scan all chart expressions to see if<br />

any ambiguities have occurred as a result of changes in data structures. If ambiguous expressions are<br />

found, a warning dialog will be shown and the expression will be disabled. It will not be possible to<br />

enable the expression until the problem has been corrected. If a log file is enabled, all ambiguous<br />

expressions will be listed in the log.<br />

There is a simple way to overcome these limitations. Load the field an extra time under a new name from the<br />

table where frequency counts should be made. Then use the new field for a list box with frequency, for a statistics<br />

box or for calculations in the charts.<br />

Synthetic Keys<br />

When two or more internal tables have two or more fields in common, this implies a composite key relationship.<br />

<strong>QlikView</strong> handles this through synthetic keys. These keys are anonymous fields that represent all<br />

occurring combinations of the composite key. When the number of composite keys increases, depending on<br />

data amounts, table structure and other factors, <strong>QlikView</strong> may or may not handle them gracefully. <strong>QlikView</strong><br />

may end up using excessive amount of time and/or memory. Unfortunately the actual limitations are virtually<br />

impossible to predict, which leaves only trial and error as a practical method to determine them.<br />

Therefore we recommend an overall analysis of the intended table structure by the application designer. Typical<br />

tricks include:<br />

l Forming the own non-composite keys, typically using string concatenation inside an AutoNumber<br />

script function.<br />

l Making sure only the necessary fields connect. If for example a date is used as a key, make sure not<br />

to load e.g. year, month or day_of_month from more than one internal table.<br />

Circular <strong>Reference</strong>s ("Loops")<br />

If there are circular references ("loops") in a data structure, the tables are associated in such a way that there<br />

is more than one path of associations between two fields.<br />

This type of data structure should normally be avoided as much as possible, since it might lead to ambiguities<br />

in the interpretation of data. Unfortunately, circular structures are quite common in the real world. In<br />

some cases they are a result of poor database design, but in certain cases they may be unavoidable.<br />

Three tables with a circular reference<br />

<strong>QlikView</strong> solves the problem of circular references by breaking the loop with a loosely coupled table. When<br />

<strong>QlikView</strong> finds circular data structures while executing the load script, a warning dialog will be shown and<br />

one or more tables will be set as loosely coupled. <strong>QlikView</strong> will typically attempt to loosen the longest<br />

table in the loop, as this is often a transaction table, which normally should be the one to loosen. If you do<br />

not like <strong>QlikView</strong>'s default choice of table to set as loosely coupled, it is possible to declare a specific table<br />

as loosely coupled via a loosen table statement in the script. It is also possible to change the settings for<br />

loosely coupled tables interactively in the Document Properties: Tables page after the script has been<br />

executed. See chapter Logic and Selections (page 107), for more information on loosely coupled tables.<br />

368

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!