7.3 Data Model Validation, Source Reconciliation & Subset Ratios
Key Takeaways
Data model validation requires reconciling both row counts and aggregate financial/operational measures between Qlik Sense and the underlying source systems of record.
Matching row counts alone does not guarantee model integrity; compensatory errors such as un-deduplicated join fan-outs paired with unintended row filters can preserve row totals while distorting monetary sums.
Information Density measures field completeness within a single table, representing the percentage of non-null records relative to the total rows in that table.
Subset Ratio measures the proportion of global distinct values of a field present in a specific table; a Subset Ratio of 100% in a Fact table paired with < 100% in a Dimension table indicates critical orphan fact records missing from the dimension master.
Key tags in the Data Model Viewer ($key, $numeric, $text) provide immediate visual audits of field data types, associativity, and synthetic key risks across data structures.
Data Model Validation, Source Reconciliation & Subset Ratios
Designing an elegant, high-throughput associative data model is worthless if the numbers delivered to executive leadership fail to reconcile with official corporate records. In enterprise business intelligence, the Qlik Data Architect bears sole responsibility for verifying the mathematical veracity and referential integrity of the in-memory data model.
Validating a data model requires moving beyond simple visual spot-checks on dashboard charts. It demands a systematic Quality Assurance (QA) methodology that compares in-memory data structures against source relational databases, audits key associations, and interprets core diagnostic metrics within the Data Model Viewer—most critically, Information Density and Subset Ratio.
1. Enterprise QA Methodology & Source Reconciliation Framework
In a multi-tier QVD architecture, reconciliation testing must occur across every stage of the pipeline to isolate defects before data enters production presentation applications.
MULTI-TIER RECONCILIATION AUDIT POINTS:
[Source Database / ERP] ──► SQL SELECT COUNT(*), SUM(Amount)
│
▼ [Audit Point 1: Extraction Parity]
[Tier 1: Raw QVDs] ──► NoOfRows(), Table Lineage Check
│
▼ [Audit Point 2: Transformation Integrity]
[Tier 2: Conformed] ──► Validate ApplyMap lookups, Master Calendar dates
│
▼ [Audit Point 3: Model Associativity & Measure Parity]
[Tier 3: Presentation] ──► Data Model Viewer Diagnostics (Subset Ratios, $Keys)
Front-End Measure Reconciliation vs. Financial Ledger
The Four Core Reconciliation Dimensions
1. Record Count Parity
- Execute
SELECT COUNT(*) FROM source_tableon the transactional database and compare againstNoOfRows('TargetTable')in Qlik. - Any discrepancy indicates unintended load filters, failed incremental high-watermarks, or dropped records during extraction.
2. Aggregate Measure Parity
- Calculate key business metrics (e.g.,
SUM(gross_revenue),SUM(tax_amount),SUM(quantity_shipped)) in SQL and compare directly against Qlik expressions (Sum(GrossRevenue),Sum(TaxAmount),Sum(QuantityShipped)). - Must be reconciled globally and partitioned across core dimensions (e.g., parity by Fiscal Year, by Sales Region, by Product Line).
3. Boundary & Extreme Value Testing
- Validate temporal boundaries:
Min(OrderDate)andMax(OrderDate)must match the earliest and latest dates in the source transactional ledger. - Inspect zero balances, negative values (credit notes, returns), and outlier maximums to ensure numeric sign conventions were preserved during ETL casting.
4. Granularity & Primary Key Uniqueness
- Verify that dimension tables maintain 100% uniqueness on their primary keys:
NoOfRows('Customers')must exactly equalCount(DISTINCT CustomerID). - Any variance reveals duplicate rows that will trigger accidental Cartesian fan-outs during associative selections.
The Trap of Relying Solely on Row Counts
Important
Why Row Count Parity Does Not Prove Correctness: A novice architect might verify that both SQL and Qlik report exactly 5,000,000 rows and assume the model is valid. However, compensating errors can completely mask catastrophic data defects. For example:
- An accidental inner join drops 250,000 legitimate low-value orders.
- An un-deduplicated bridge table duplicates 250,000 high-value order lines.
- Net result: Total row count remains exactly 5,000,000 rows, but
Sum(NetSales)is distorted by tens of millions of dollars! True data model validation mandates both row count parity and aggregate measure parity.
2. Data Model Viewer Diagnostics: Information Density
When inspecting any table or field in the Qlik Sense Data Model Viewer, the metadata card displays two critical statistical metrics: Information Density and Subset Ratio.
DATA MODEL VIEWER METADATA CARD:
┌────────────────────────────────────────────────────────┐
│ Field: CustomerID │
│ Table: Fact_Orders │
├────────────────────────────────────────────────────────┤
│ Total Records: 10,000,000 │
│ Distinct Values: 450,000 │
│ Information Density: 100 % │
│ Subset Ratio: 90 % │
│ Tags: $key, $numeric, $integer │
└────────────────────────────────────────────────────────┘
Definition & Mathematical Formula
Information Density is strictly an intra-table metric. It measures the degree of data completeness for a specific field within a given table by calculating the percentage of rows that contain a valid, non-null value:
Architectural Interpretation
- 100% Information Density: Every single record in the table contains a valid value for this field. Primary keys, foreign keys, transaction dates, and core financial amounts must always exhibit 100% information density. A primary key with < 100% information density is a critical defect.
- < 100% Information Density: The field is sparse and contains null values. This is normal for optional business attributes (such as
DiscountCode,MiddleName,CancellationReason, orShipTrackingNumber). - 0% Information Density: The field is entirely empty/null across all rows in that table. This signals an extraction configuration failure, an incorrect column alias, or an unpopulated source database column.
3. Data Model Viewer Diagnostics: Subset Ratio
While Information Density evaluates row completeness within one table, Subset Ratio evaluates the distribution and coverage of distinct field values across all tables in the entire data model.
Definition & Mathematical Formula
Subset Ratio measures what proportion of the total distinct values of a field found anywhere in the data model are present within this specific table:
The Subset Ratio Diagnostic Matrix
Understanding the interplay of Subset Ratios between Dimension and Fact tables is a primary competency tested in the QSDA certification exam. The following diagnostic matrix details how to interpret every possible combination:
| Dimension Table Subset Ratio | Fact Table Subset Ratio | Diagnostic Health Assessment | Technical Architectural Explanation & Real-World Meaning |
|---|---|---|---|
| 100% | 100% | Complete Key Match | Every distinct key in the Dimension exists in the Fact, and every key in the Fact exists in the Dimension. Typical in 1:1 models or closed operational cycles where all master items are active. |
| 100% | < 100% | NORMAL / EXPECTED (Healthy Star Schema) | The standard, healthy state of dimensional modeling! The master dimension table contains the complete enterprise catalog (100% of customers, products, or cost centers). The fact table only contains entities that had transactions in the active period (< 100%). Master records exist that have not generated transactions yet. |
| < 100% | 100% | CRITICAL INTEGRITY DEFECT: ORPHAN FACT RECORDS! | Severe data integrity failure! Every key in the dimension appears in the fact, but the fact table contains additional keys that DO NOT EXIST in the master dimension! Fact transactions reference missing master records. |
| < 100% | < 100% | Mutual Disconnect (Orphans + Inactive) | Both tables contain keys absent in the other. There are registered dimension entities with no sales, AND orphan fact transactions referencing nonexistent master entities. Common in dirty migrations or outer join merges. |
THE ORPHAN FACT RECORD DISASTER (<100% Dimension & 100% Fact):
[Dim_Customer (Subset Ratio = 80%)] [Fact_Orders (Subset Ratio = 100%)]
CustomerID CustomerName Region OrderID CustomerID GrossAmount
────────── ──────────── ────── ─────── ────────── ───────────
C101 Acme Corp East 1 C101 $10,000
C102 Beta LLC West 2 C102 $25,000
3 C999 $50,000 [ORPHAN! Missing in Dim!]
4 C998 $35,000 [ORPHAN! Missing in Dim!]
IMPACT ON FRONT-END DASHBOARDS:
- Total Unfiltered Revenue: $120,000
- User selects Region = 'East' + 'West': Revenue displays $35,000!
- The $85,000 from C999 and C998 has Region = Null ('-').
- When filtering on ANY customer attribute, $85,000 of revenue completely DISAPPEARS from charts!
Root Causes of Orphan Fact Records (< 100% in Dimension)
- Upstream Extraction Filter: The dimension extraction script contained an aggressive filter (e.g.,
WHERE is_active = 1orWHERE account_status = 'Open'), omitting historical or closed accounts that still hold open transactional invoices. - Out-of-Sync Extraction Schedules: Fact tables were reloaded from production, but the master dimension reload failed or ran before a batch of new customer accounts was committed.
- Dirty Foreign Keys: Source transactional systems permitted users to enter freeform, placeholder, or deprecated foreign key codes (e.g.,
0000,9999,TEMP) that have no corresponding record in master tables.
4. Key Tags and Metadata Analysis in Data Model Viewer
The Data Model Viewer automatically evaluates every field and assigns descriptive system tags. Inspecting these tags reveals structural defects:
System Tags Reference
$key: Designates a link field shared between two or more tables. If a field intended to link tables does not carry$key, the field names differ and association is broken.$keypart: Marks a field that is part of one or more synthetic keys, an early warning that two tables share more than one field.$numeric: Indicates the field contains purely numeric dual values. Essential for fields participating in mathematical aggregations (Sum(),Avg()).$text: Indicates the field contains string data. If a financial amount or numeric key displays$textinstead of$numeric, numbers were loaded with formatting noise, preventing mathematical aggregation.$ascii: Indicates fields composed purely of standard ASCII characters.$date/$timestamp: Recognizes valid temporal dual values.$syn: Flags synthetic key fields generated by Qlik when two tables share multiple identical column names.
The Data Type Mismatch Trap
If CustomerID is loaded as an integer in Fact_Orders ($numeric) and as padded text in Dim_Customer ($text, e.g., ' 101'), the field still carries $key, but 101 and ' 101' are different field values, so those rows never associate. Always enforce strict typing in the Transform tier (Upper(Trim(KeyField)) or Num(KeyField)).
5. Step-by-Step Source-to-Qlik Reconciliation Checklist
Before certifying any Qlik data model for production release, the Data Architect must execute this structured 6-step reconciliation protocol:
┌────────────────────────────────────────────────────────────────────────┐
│ ENTERPRISE DATA MODEL RECONCILIATION CHECKLIST │
├────────────────────────────────────────────────────────────────────────┤
│ [ ] Step 1: Topology & Schema Audit │
│ - Open Data Model Viewer. Verify zero synthetic keys ($Syn). │
│ - Confirm absence of circular reference loops (loosely coupled). │
│ - Verify star or snowflake schema conformity. │
├────────────────────────────────────────────────────────────────────────┤
│ [ ] Step 2: Key Tags & Associative Type Parity │
│ - Audit all $key fields across connecting tables. │
│ - Confirm identical data types ($numeric vs $text) across keys. │
├────────────────────────────────────────────────────────────────────────┤
│ [ ] Step 3: Information Density & Subset Ratio Verification │
│ - Verify 100% Information Density on all primary and foreign keys. │
│ - Confirm Dimension tables have 100% Subset Ratio on primary keys. │
│ - Flag and resolve any < 100% Subset Ratio on master dimensions. │
├────────────────────────────────────────────────────────────────────────┤
│ [ ] Step 4: Extraction Record Count Parity │
│ - Reconcile NoOfRows('FactTable') against database COUNT(*). │
│ - Confirm delta watermarks captured 100% of modified rows. │
├────────────────────────────────────────────────────────────────────────┤
│ [ ] Step 5: Multi-Dimensional Financial Measure Parity │
│ - Reconcile Sum(NetRevenue) against corporate general ledger. │
│ - Validate parity across Fiscal Years, Months, and Legal Entities. │
├────────────────────────────────────────────────────────────────────────┤
│ [ ] Step 6: Temporal Boundary & Range Audit │
│ - Confirm Min(OrderDate) and Max(OrderDate) match source extremes. │
│ - Verify Master Calendar contains zero date gaps across range. │
└────────────────────────────────────────────────────────────────────────┘
6. Enterprise Production Scenario: The $14.3 Million Vanishing Revenue Audit
Business Problem
During a quarterly earnings audit at a global healthcare distributor, the Chief Financial Officer identified a major discrepancy: the official Oracle ERP General Ledger reported $198,500,000 in quarterly gross invoiced sales, while the newly launched Qlik Sense Executive Dashboard reported only $184,200,000—an unexplained $14,300,000 variance.
Diagnostic Investigation
The lead architect was tasked with isolating the discrepancy:
- Row Count Audit: The architect compared row counts. Oracle reported 1,420,000 invoice line items; Qlik Sense reported
NoOfRows('Fact_Invoices') = 1,420,000. Row counts matched 100%! - Unfiltered KPI Audit: A test KPI object displaying
Sum(InvoiceLineAmount)without any selections or dimensional breakdowns evaluated to exactly $198,500,000! The full revenue was present inside the application. - Dimensional Filtering Audit: However, when executive users opened the dashboard, the regional filter pane defaulted to selecting active sales territories (
Region = {'East', 'West', 'Central', 'South'}). In this filtered state, the total plummeted to $184,200,000. - Data Model Viewer Inspection: The architect inspected the link key
AccountID:- In
Fact_Invoices: Information Density = 100%, Subset Ratio = 100%. - In
Dim_Customer: Information Density = 100%, Subset Ratio = 82%!
- In
DIAGNOSTIC FINDING:
- Dim_Customer only contained 82% of the distinct AccountIDs present in Fact_Invoices!
- 18% of customer accounts were completely missing from Dim_Customer.
- Because these accounts had no entry in Dim_Customer, their Region attribute was Null ('-').
- When the executive filter selected all named regions, the 18% of invoices with null regions were excluded!
- Total value of invoices belonging to missing customer accounts: EXACTLY $14,300,000!
Root Cause & Remediation
- Root Cause: In the Tier 1 extraction script for
Dim_Customer, a legacy SQL clause read:
During the quarter, corporate restructuring merged several operating units, marking historical accounts asSELECT * FROM erp.customer_master WHERE account_status = 'ACTIVE';'INACTIVE'or'SUBSIDIARY'in the master table. However, historical invoices still referenced these accounts. The extraction script discarded them, creating orphan fact records. - Remediation: The architect updated the customer extraction script to load all historical accounts regardless of active status. As a safeguard, the transform tier now appends a placeholder row to
Dim_Customerfor anyAccountIDthat appears inFact_Invoicesbut not in the customer master (Region = 'Unassigned Territory'), so future orphans stay visible and countable instead of disappearing under region filters. - Outcome: The Subset Ratio in
Dim_Customerrose to 100%, orphan records were eliminated, and Qlik Sense reconciled 100% with the corporate general ledger across all regional filters.
7. Common Exam Pitfalls & Traps
Warning
Pitfall 1: Confusing Information Density with Subset Ratio Believing that a high Information Density guarantees key integrity. A field can have 100% Information Density (zero nulls) while having a disastrous Subset Ratio (e.g. 50% orphan records). Information Density measures row completeness within a table; Subset Ratio measures distinct value coverage across tables.
Warning
Pitfall 2: Assuming Row Count Parity Proves Measure Accuracy
Validating only that NoOfRows() matches database COUNT(*). If an un-deduplicated join causes a fan-out on high-value rows while an accidental filter drops low-value rows, the row count remains identical while financial totals are completely corrupted. Always validate both row count parity and aggregate measure parity.
Warning
Pitfall 3: Dismissing < 100% Subset Ratio on Dimension Tables
Seeing a Subset Ratio of 80% on Dim_Customer and assuming it means 20% of customers have no sales. In the Dimension table, the primary key must have a 100% Subset Ratio! Having < 100% on the dimension means the fact table contains keys that do not exist in the dimension (orphan transactions).
Warning
Pitfall 4: Relying on Formatted Text Numbers for Calculations
Loading financial amounts containing currency symbols (e.g., '$1,250.00') without using Num#(). In the Data Model Viewer, the field will display the $text tag instead of $numeric. Front-end aggregations like Sum(Amount) will evaluate to zero or omit formatted records without throwing a script error.
Warning
Pitfall 5: Timestamp Precision Mismatches on Link Keys
Linking two tables on a datetime field where Table A contains 2026-10-15 00:00:00 (integer 46310.0) and Table B contains 2026-10-15 14:30:15 (float 46310.6043). Both may display as '2026-10-15' if formatted, but they will fail to associate. Always apply Floor() when linking on date keys.
While auditing an in-memory data model in the Data Model Viewer, a Qlik Data Architect inspects the key field CustomerID connecting the Customers dimension table and the Orders fact table. The Data Model Viewer displays the following statistics for CustomerID: In Customers (Dimension): Information Density = 100%, Subset Ratio = 78%. In Orders (Fact): Information Density = 100%, Subset Ratio = 100%. What critical data integrity problem does this diagnostic pattern reveal?
The Customers dimension table contains duplicate records causing a many-to-many relationship with Orders.
The data model is perfectly healthy, indicating that 22% of registered customers have not yet placed an order.
The Orders fact table contains orphan transaction records referencing CustomerIDs that do not exist in the Customers master table.
The CustomerID field is stored as pure text in Customers and as an integer in Orders, breaking association.
What is the precise architectural distinction between Information Density and Subset Ratio as reported in the Qlik Sense Data Model Viewer?
Information Density measures memory compression efficiency, while Subset Ratio measures CPU query latency.
Information Density indicates the percentage of numeric values in a field, while Subset Ratio indicates the percentage of text values.
Information Density reflects the proportion of distinct values in the table, while Subset Ratio reflects total row count parity against SQL source tables.
Information Density measures the proportion of non-null records within a specific table, while Subset Ratio measures the proportion of global distinct field values present in that table.
During a source reconciliation audit, an architect observes that the row count of the Fact_Orders table in Qlik Sense exactly matches the record count of the source relational database table (both reporting exactly 2,500,000 rows). However, the business reports that Sum(NetSales) in Qlik is $4,000,000 higher than the financial ledger in the database. What data modeling defect explains this discrepancy despite matching row counts?
An erroneous join between Orders and an un-deduplicated bridge table caused record fan-out that duplicated certain order lines while an upstream filter dropped an equal number of orders, masking the discrepancy in row count.
Qlik Sense uses 64-bit IEEE floating-point arithmetic which inherently introduces an upward rounding error of several million dollars on large sums.
The Data Model Viewer's Information Density setting was set to zero, causing the QIX engine to double-count transactions.
The NetSales measure was formatted with Money() rather than Num(), which automatically inflates underlying values by the currency conversion index.
Sections you finish are checked off in the contents.