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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Even though this is a correct pivot table, the effects of <strong>QlikView</strong>'s logic could here potentially lead to undesired<br />

results. If we select the year 2000 the layout will look as follows:<br />

Product group Z is "gone". This is natural since the value Z in the field ProdGrp has been excluded by the<br />

selection of the value 2000 in the field Year. However, the boss is likely to want Z in the chart with a 0 in<br />

the sum(Amount) column, so that it is clear to everyone that product group Z exists and that nothing has<br />

been sold in 2000.<br />

One could argue that the two fields Year and ProdGrp really have nothing to do with each other and therefore<br />

should not interact just because they happen to be associated via the Trans table. So let's fix that by<br />

declaring the Trans table as loosely coupled. Immediately our little layout will have the following look of:<br />

The table looks like we want it to look. Note that the selection in the Year list box does not render any<br />

value in the ProdGrp list box excluded.<br />

As a summary can be said that this situation, with one or more transaction tables surrounded by a number of<br />

dimensions which should not be excluded, is quite common. Loosely coupled tables is one possible way of<br />

handling such cases.<br />

Loosely Coupled Tables and Subtotals<br />

When using loosely coupled tables in combination with non-hierarchical dimension data subtotals in pivot<br />

tables may become incorrect. The example below is very similar to the previous example, but product B now<br />

belongs to two product groups, X and Y. The product D has disappeared and that sale is now product B<br />

instead.<br />

120

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

Saved successfully!

Ooh no, something went wrong!