The data model that nobody reviews... until everything crashes
There’s a conversation that inevitably comes up in every company that implements QlikSense without architectural planning: «Why does the dashboard take 40 seconds to load?», «Why do we have duplicate values?», «Why did everything break when I added a new data source?». In 90% of cases, the answer is always the same: the Qlik Sense data modeling It was improvised, not designed. And an improvised model doesn't scale.
The statistics are clear: a flat, denormalized table with 50 columns can make your app 10 times slower than the same data structured as a star schema with optimized tables. Well-implemented QVDs load between 10 and 100 times faster than direct database queries. They aren't marginal improvements. They are the difference between a BI tool that gets used and one that gets avoided.


The Real Problem: A Bad Data Model Destroys BI ROI
I've reviewed BI projects where $$80,000 was spent on licenses, servers, and consulting, and the end result was a dashboard that took 2 minutes to open. Users would leave before it finished loading. The tool itself was excellent. The data model was a disaster.
The symptoms are known to any experienced implementer: synthetic keys (the famous tables with the yellow key icon), circular references, fact tables with embedded dimensions, load scripts that mix business transformations with data extraction, and QVD files without any incremental update strategy. Each of these problems has a measurable cost in performance and user trust.
According to the DataStackHub Business Intelligence Statistics 2025-2026 report, the 43% of BI projects fail in achieving sustained adoption. The number one cause is neither a lack of data nor business complexity: it is the accumulated technical debt in the data model that makes maintaining and evolving apps prohibitively costly.
The Solution: Three-Tier Architecture with QVDs
Why the three-tier model is the professional standard
The three-tier architecture is the pattern that separates responsibilities and allows each part of the system to be independently maintainable, testable, and scalable. It is not a personal preference: it is the way senior QlikSense implementers structure their projects in production.
// ===== TIER 1: EXTRACTION (RAW QVD) =====
// Only extracts. Does not transform. Does not filter.
// One script per data source.
[Ventas_RAW]:
LOAD
FechaDocumento,
NumeroDocumento,
CodigoCliente,
CodigoProducto,
Cantidad,
PrecioUnitario,
CostoUnitario
FROM [lib://BBDD_ERP/ventas] (odbc, table is [dbo].[vw_Ventas]);
STORE [Ventas_RAW] INTO [lib://QVD_Raw/Ventas_RAW.qvd] (qvd);
// ===== TIER 2: TRANSFORMATION (CLEAN QVD) =====
// Business rules live here. Only reads Tier 1 QVDs.
[Ventas]:
LOAD
Date(FechaDocumento) AS Fecha,
NumeroDocumento AS NroDoc,
CodigoCliente AS CodCliente,
CodigoProducto AS CodProducto,
Cantidad,
PrecioUnitario,
CostoUnitario,
Cantidad * PrecioUnitario AS VentaBruta,
Cantidad * CostoUnitario AS CostoVenta,
(Cantidad * PrecioUnitario) - (Cantidad * CostoUnitario) AS MargenBruto,
// Derived fields for the master calendar
Year(FechaDocumento) AS Año,
Month(FechaDocumento) AS MesNombre,
Month(FechaDocumento) AS MesNum,
'Q' & Ceil(Month(FechaDocumento)/3) AS Trimestre
FROM [lib://QVD_Raw/Ventas_RAW.qvd] (qvd);
STORE [Ventas] INTO [lib://QVD_Clean/Ventas.qvd] (qvd);
// ===== TIER 3: APP (FINAL LOAD) =====
// The app only reads from Tier 2 QVDs. Never directly from the DB.
[Ventas]:
LOAD * FROM [lib://QVD_Clean/Ventas.qvd] (qvd);
Star Schema: The Structure That Makes QlikSense Fly
Qlik Sense has an associative engine that works optimally with a star schema model: a central fact table (transactions, sales, movements) surrounded by dimension tables that explain it (customers, products, dates, salespeople). This model minimizes RAM, speeds up calculations, and eliminates synthetic keys that degrade performance.
// FACT TABLE: Only foreign keys + numeric metrics
// No descriptive fields. No attribute duplication.
[FactVentas]:
LOAD
CodCliente, // FK -> DimCliente
CodProducto, // FK -> DimProducto
FechaKey, // FK -> DimFecha (YYYYMMDD format as number)
CodVendedor, // FK -> DimVendedor
CodSucursal, // FK -> DimSucursal
VentaBruta,
CostoVenta,
MargenBruto,
Cantidad
FROM [lib://QVD_Clean/Ventas.qvd] (qvd);
// DIMENSION DATE: The master calendar
// This is the most important component of the model.
// Automatically generates all temporal attributes.
[DimFecha]:
LOAD
Date(TempDate) AS Fecha,
Year(TempDate) AS Año,
Month(TempDate) AS MesNombre,
Month(TempDate) AS MesNum,
'Q' & Ceil(Month(TempDate)/3) AS Trimestre,
Week(TempDate) AS NumSemana,
WeekDay(TempDate) AS DiaSemana,
Day(TempDate) AS NumDia,
If(TempDate <= Today(), 1, 0) AS EsPasado,
If(Year(TempDate) = Year(Today()), 1, 0) AS EsAñoActual,
// Numeric key for the fact table
Year(TempDate)*10000 + Month(TempDate)*100 + Day(TempDate) AS FechaKey
;
LOAD
Date(MinDate + IterNo() - 1) AS TempDate,
MinDate,
MaxDate
WHILE Date(MinDate + IterNo() - 1) <= MaxDate;
LOAD
Min(Fecha) AS MinDate,
Max(Fecha) AS MaxDate
RESIDENT FactVentas;
DROP FIELD TempDate, MinDate, MaxDate FROM DimFecha;


Incremental Load with QVDs: The Fuel of Scalability
Incremental loading is the pattern that allows an app with millions of records to refresh in minutes, not hours. Instead of reloading everything from the database on each execution, you only read new or modified records and concatenate them to the existing QVD.
// INCREMENTAL LOAD - Professional Template
// Step 1: Read the date of the last record in the existing QVD
LET vLastDate = Peek('Date', -1, 'Sales_Temp');
// If the QVD exists, load the newest records
IF IsNull(vLastDate) THEN
// First load: retrieve everything
[Sales_NEW]:
SQL SELECT * FROM dbo.vw_Sales;
ELSE
// Incremental load: only the new records
[Sales_NEW]:
SQL SELECT * FROM dbo.vw_Sales
WHERE DocumentDate > '$(vLastDate)';
END IF
// Step 2: Load the existing QVD (only records prior to the cutoff)
[Sales_OLD]:
LOAD * FROM [lib://QVD_Raw/Sales_RAW.qvd] (qvd)
WHERE Date < '$(vLastDate)';
// Step 3: Concatenate both tables
CONCATENATE ([Sales_OLD])
LOAD * RESIDENT [Sales_NEW];
RENAME TABLE [Sales_OLD] TO [Sales];
DROP TABLE [Sales_NEW];
// Step 4: Overwrite the QVD with the updated set
STORE [Sales] INTO [lib://QVD_Raw/Sales_RAW.qvd] (qvd);
Business Impact: What a Good Model Means
A distributor company I worked with had its QlikSense app with load times of 3-4 minutes and a nightly refresh that took 6 hours. After redesigning the model with a three-layer architecture, star schema, and incremental load, the app's load time dropped to 8 seconds and the nightly refresh went from 6 hours to 22 minutes.
The impact on the business was immediate: the management team began using the dashboard in their morning meetings—something that had previously been impossible because «it never loaded in time.» The investment in redesigning the model (3 days of work) generated an estimated return on productivity of $$15,000 annually from recovered waiting time alone.
According to data from the BI Statistics Report 2025, organizations with mature BI architectures achieve a reduction of 37% during development of new apps and of the 52% in Incidents Involving Incorrect Data. Architecture is not overhead, it's an investment.
Common Errors in Data Modeling
Implementation Best Practices
Document the visual model before writing a single line of script. The Qlik Sense Data Model Viewer is your validation tool, not your discovery tool. Define on paper (or Lucidchart) how the tables will relate before writing the code. A visualized model before coding saves hours of debugging.
Use standardized names for the keys. Define a convention and apply it without exception: Customer Code in all scripts, never cod_cli, CustomerID, o Customer ID in the same app. Field name consistency is what makes QlikSense's associative engine work automatically and without ambiguity.
Always include a load date field in your QVDs. Add Today() AS FechaCarga in each extraction script, it allows you to audit when each table was updated, diagnose synchronization issues, and build data quality reports for users.


Strategic Conclusion: The Model is the Product
In the successful BI projects I have implemented, there is a recurring pattern: the time invested in designing the Qlik Sense data modeling Before developing any visualization, it is always retrieved multiplied. The model is not the backend of BI. The model is the product. When the model is robust, apps are built quickly, work consistently, and scale without drama. When the model is fragile, every improvement is a crisis.
The three-tier architecture, star schema, incremental load, and QVD strategy are not academic concepts. They are design decisions with a direct impact on how long it takes your managers to get the information they need to run the company. And that time has a cost that can be measured.
Do you want to take your BI strategy to the next level? In hectorpincheira.com you will find more strategic content on how to turn technology into a real competitive advantage for your organization.
A good data model does not guarantee data-driven decisions. I explain why in The Semmelweis Reflex: Why Data Doesn't Save Companies That Refuse to Look.




