Qlik Sense layered architecture - the QVD design that scales your BI

Publications

Qlik Sense Layered Architecture: The QVD Design That Scales Your BI

Hector Pincheira

Hector Pincheira

CIO | CTO
Digital Strategy & Technology Innovation

items

Most BI projects do not collapse from a lack of data, but from a lack of architecture. At first, everything works: an app that connects to the database, transforms, and displays. A year later, that same app takes forty minutes to reload, three different applications give three different sales figures, and no one dares to touch the script for fear of breaking something. The Qlik Sense layer architecture It is the mature response to that chaos: separating extraction, transformation, and presentation into tiers that are governed separately.

Qlik Sense layered architecture - extraction transformation presentation QVD

It is not an optional sophistication for large corporations. It is the difference between a BI that scales with your company and one that becomes a fragile monolith that a single change can take down. Here I show you how to design it.

The real problem: the monolith that nobody wants to touch

When a single application does it all—connecting, cleaning, calculating, and visualizing—every reload hits the transactional database once again with heavy queries. The nightly window shrinks, the ERP suffers, and the reload time grows out of control.

Worse still is duplication. Every new dashboard rewrites its own loading logic, and with it its own definitions. This is how the «three truths» are born: sales in one app don't match sales in another, because each one filtered differently. Trust in BI erodes, and without trust, data stops being used to make decisions.

The technical root is simple: reading from a database is slow and expensive. Instead, reading a QVD file is between 10 and 100 times faster than any other source, and in optimized mode the gain reaches up to 100 times. Ignoring that fact is leaving performance—and control—on the table.

The solution: three layers with QlikSense layer architecture

The three-tier design separates responsibilities. Each layer does a single thing well and delivers its result in QVD to the next one. Think of it like a production line: no one cuts, sews, and packs at the same station.

LAYER 1 — EXTRACTION   → reads sources, without transforming, saves raw QVD
LAYER 2 — TRANSFORMATION → cleans, joins, applies business logic, saves ready QVD
LAYER 3 — PRESENTATION  → loads ready QVDs (binary/optimized), model + visual only

Layer 1: Untransformed extraction

The first layer has a single mission: to extract data from the source as quickly as possible and deposit it into QVD, without calculating anything. Each source table becomes a raw QVD. This frees up the ERP almost immediately: the heavy connection happens just once, not in every app.

// LAYER 1 — Raw extraction (no transformations)
Sales:
LOAD *;
SQL SELECT * FROM dbo.SalesFacts
WHERE DocDate >= '$(vLoadDate)';
STORE Sales INTO [lib://QVD_Extract/Sales.qvd] (qvd);
DROP TABLE Sales;

Look at that no neither renames, nor calculations, nor joins. Only one SELECT and a STORE. That austerity is deliberate: it keeps extraction fast and allows for incremental loading, because the date filter brings in only the new data and accumulates it over the historical QVD.

Layer 2: Transformation and Business Logic

All the intelligence lives here. The second layer reads the raw QVDs, cleans them, applies ApplyMap To enrich, it joins tables, calculates flags and derived fields, and saves «business-ready» QVDs. It is the only layer where logic is defined—and that is why it is the only single source of truth.

// LAYER 2 — Transformation (centralized business logic)
mapMoneda:
MAPPING LOAD CodMoneda, TasaCambio
FROM [lib://QVD_Extract/Monedas.qvd] (qvd);
VentasTransformada:
LOAD
    IDVenta,
    Cliente,
    FechaDoc,
    Monto,
    Monto * ApplyMap('mapMoneda', CodMoneda, 1) AS MontoCLP,
    If(Monto >= vUmbralGrande, 'Mayorista', 'Retail') AS SegmentoVenta
FROM [lib://QVD_Extract/Ventas.qvd] (qvd);
STORE VentasTransformada INTO [lib://QVD_Transform/Ventas.qvd] (qvd);

The MAPPING LOAD with ApplyMap Convert the currency without an expensive JOIN. And since the result is saved in a governed QVD, any app that needs sales in pesos consumes the same field Amount in CLPthe three truths are over.

Layer 3: Optimized loading presentation

The third layer is the app that the user sees. It doesn't transform anything: it just loads the ready QVDs and builds the data model and visualizations. And here lies the secret to performance—optimized loading.

// LAYER 3 — Presentation (optimized load, untransformed)
Ventas:
LOAD * FROM [lib://QVD_Transform/Ventas.qvd] (qvd);
// ✔ Optimized load: NO calculations, NO WHERE (except a WHERE EXISTS)
// ✘ This BREAKS the optimization:
// LOAD *, Monto*1.19 AS MontoConIVA FROM ... (qvd);

The golden rule: a load is optimized only if there are no transformations or a WHERE with calculation —at most a single one is allowed WHERE EXISTS— Just add a calculated field in the LOAD for QlikSense to switch to standard mode and lose the up to 100x acceleration. That's why every calculation lives in layer 2, never in layer 3.

💡 Key point: The QVD layer functions as a central library of governed data: clean, timely, and association-ready snapshots. Once you transform, many apps consume. Transforming once and reading a hundred times is the heart of the design.

Business impact: speed, trust, and scale

The first effect is speed. By reading QVD instead of the database, reloads drop from minutes to seconds, and the nightly window stops being a bottleneck. The ERP breathes, because the heavy extraction happens once and not on every dashboard.

The second effect, which is more strategic, is trust. When all the logic lives in a single layer, sales is sales everywhere. The board stops arguing about which report to believe and starts discussing what decision to make. That is the true return on data governance: not saving seconds, but recovering the credibility of BI.

The third is scale. Adding a new app no longer means rewriting the load, but rather consuming existing QVDs. BI grows by addition, not duplication, and the marginal cost of each new dashboard plummets.

Think of a specific case. An industrial company with five dashboards —sales, production, finance, inventory, and quality— that share the product master and the calendar. In a monolithic design, each app queries the database and reconstructs those tables five times every early morning. In a layered design, the extraction of the master happens just once, transformation governs it just once, and the five dashboards read it in optimized mode in seconds. The same data, a single definition, five consumers. When the sixth dashboard arrives, there will be no need to touch the load: just connect it to the already existing QVD library. That is the concrete promise of layered architecture.

Common Mistakes and How to Avoid Them

⚠️ Common error: Putting transformations in the presentation layer «to avoid creating another QVD.» That breaks optimized load and drags it back into the monolith. All logic goes in layer 2, always.

The second mistake is transforming in the extraction layer. If you clean or calculate when extracting the data, you lose the reusable raw QVD and tie that source to a single use. Layer 1 only extracts; nothing else.

The third is not naming by convention. Without a standard for folders and prefixes per layer, in six months no one knows which QVD is raw and which is transformed. A clear naming scheme is pure governance.

The fourth is to forget the WHERE EXISTS as the only permitted filter in optimized loading. Any other filter involving calculation degrades performance without warning; it is advisable to check the reload log to confirm that the load was optimized.

Best practices from experience

Adopt a layer-by-layer folder framework —extraction, transformation, presentation— and respect it like law. Structural discipline is worth more than any script trick, and it is the foundation of a BI system that others can maintain without you. I have developed more on data governance and architecture in hectorpincheira.com.

Combine this architecture with incremental loading in layer 1 to process only new data, and with master metrics in layer 3 to also govern visualization calculations. Lightweight extraction, single transformation, fast presentation: that is the pattern that sustains serious enterprise BI.

Document every QVD with its source, reload frequency, and owner. That catalog turns the data library into an auditable asset: when someone asks where a number comes from, the answer is a click away, not in the memory of the person who wrote the script a year ago. Undocumented architecture ages; with documentation, it becomes organizational heritage.

Strategic conclusion

A BI without architecture is a house built on sand: it looks good until the first tide. Layered architecture is not technical bureaucracy; it is the scaffolding that allows your analytics to grow without collapsing, ensures that every app speaks the same language, and means that adding value does not require rewriting the past.

The question that defines your analytical maturity is not how pretty your latest dashboard is, but what happens when you need the number ten. If the answer is «I rewrite the load and pray,» your BI is a monolith. If it is «I consume a QVD that already exists,» you have an architecture. And only the second one scales.

Most Read

Ballena jorobada bajo el agua con su aleta pectoral extendida: la esperanza en la tecnología y la biomimética
La ballena que volvió: la esperanza en la tecnología y la que no cabe en un tablero
SAP data in ChatGPT: an open door at the far end of a dark room
The Tab Next Door: The SAP Data in ChatGPT That Nobody Authorized
SAP Business One Purchase Price Variance - featured image of the tutorial
SAP Business One Purchase Price Variance: Detect the Inflation in Your Buying Costs
QlikSense format changeovers: actual minutes against the standard
QlikSense Format Changeovers: the Minutes Nobody Bills
QlikSense buttons and actions: executive dashboard with indicators
QlikSense Buttons and Actions: the Dashboard that Runs the Meeting
SAP Business One Internal Reconciliation - featured image of the tutorial
SAP Business One Internal Reconciliation: Clear False Open Items

RELATED ARTICLES