Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
How to achieve 100% subset ratio for data model ? what are the tips for the same ?
Excellent Example is there information density and subset ratio? What is the use of this?
Please find below information:
Information density of the field, which indicates the percentage of rows that contain a non-null value
Subset ratio, which shows the percentage of all distinct values for a field in the
table compared to all the distinct values for that field in the entire data model. It is
only relevant for key fields since they are present in multiple tables and do not all
share the same value.
Subset ratios can be used to easily spot problems in key field
For example, when the combined total of subset ratios for multiple
tables is 100 percent, this may indicate that there are no matching keys between
these tables.
REF: QlikView 11 For Developers..
Let me give you simple example
Sales:
Load * Inline
[
Customer, Sales
A, 100
B, 200
D, 300
];
Customer:
Load * Inline
[
Customer
A
B
C
D
];
If you write above sample script and will check the Table (CTRL + T), you will find two tables.
Sales and Customers
On Sales Table, if you hover the mouse on Customer field, you can see the Subset Ratio is 75% because there is not sales data for Customer C.
Now if you change the script for table Customer like below..
Customer:
Load * Inline
[
Customer
A
B
C
D
]
Where Exists (Customer);
If will not load the Customer C as there are no sales data for the same.
Now check the Subset Ratio. It will be 100%.
If subset ratio is less than 100%, the key is called as Primary Key
but for 100% it is called as Perfect Key.
Information density:
country | code |
Afghanistan | AF |
Albania | |
Algeria | DZ |
After loading the above records, go to the table viewer section (CTRL+t)
mouse over on "country" field, you will see Information density is 100%
Now mouse over on "code" field, you will see Information density is less than 100% i.e 67%
It means that, code field contains a null value in 2nd row that's why it is showing Information density is 67%
Check for Information Density and Subset Ratio: Always perform high level integrity check on your data model. You can see Information Density and Subset Ratio properties in the Table Viewer (Ctrl + T) by hovering on the fields. Investigate wherever Information Density is less than 100% and inform the Architect about the potential issue(s) with the NULL values. I would always check for Subset Ratio whenever I perform a QlikView Join. This way you know how many key field distinct values are associated to other table.
Definitions of Information Density and Subset Ratio (Source – Reference Guide):
---
hose things we can identify from ur data model table,those are created automatically based on ur data source (information density) &how u define ur keys(subset ration).
How do we test the datamodel with help of subset ratio and information density.---there is no way to test,but u can find how much correctly u define ur keys (but it not always right,means don't expect 100% ratio as correct) from data model by looking those percentage