QlikSense percentiles

Publications

QlikSense Percentiles: The Average is Lying to You About Your Operation

Hector Pincheira

Hector Pincheira

CIO | CTO
Digital Strategy & Technology Innovation

items

A supplier promises you a thirty-day delivery. They deliver, on average. However, one out of every ten orders arrives in fifty-two days, and those are precisely the ones that leave a production line shut down. The average didn't lie: it simply didn't tell the part that hurts. That is why QlikSense percentiles son, in my experience, the most cost-effective lens shift a manager can make without buying a single additional license.

QlikSense percentiles
Delivery days distribution: the right tail is what costs you customers.

I've spent years looking at gorgeous executive dashboards built on a single arithmetic operation: the mean. And I've also spent years watching how that mean erases the exact information that justifies a decision. Google, in its own site reliability engineering guide, recommends percentile-based indicators precisely because the average flattens the shape of the distribution into a misleading number. The same applies to your delivery days, your cycle times, and your margins per customer.

This article is about how to calculate QlikSense percentiles real ones, how to bring them into the script to make them actionable and, above all, how to turn them into commitments that your operation can sustain.

The average: the most comfortable and dangerous number on your dashboard

The average has a huge virtue: it reassures. However, that is precisely the problem. A classic case in latency literature illustrates this mercilessly: ninety-nine requests respond in one hundred milliseconds and one responds in ten thousand. The average comes out to about one hundred ninety-nine milliseconds, a number that describes no one's experience. Neither that of the ninety-nine, nor that of the one who suffered.

Now translate that to your business. If your average dispatch time is four days, then you don't know anything yet. Ninety percent of your orders might go out in three days and ten percent in fourteen. They might also all go out between three and five. Those are two completely different operations, with two different action plans, and your dashboard represents them with the same number.

Faros Consulting documented a devastating case: the median resolution time for critical incidents for a client had dropped from thirty-eight to twenty-four minutes. A huge improvement. However, in the report based on averages, it was invisible because two outlier incidents distorted the mean. The team was improving and their own dashboard wouldn't let them see it.

What are Qlik Sense percentiles and why do they change the decision

A percentile answers a question that the average cannot answer: below which value is X percent of my cases? First, the P50 or median marks the point where half of your orders fall below. Next, the P90 marks the threshold that only the worst ten percent exceed. The P95 describes the scenario that costs you customers.

The practical difference is huge. In fact, the average is a promise you cannot consistently keep. On the other hand, the P90 is a commitment you can sign off on. When you tell a client «ninety percent of your orders arrive in seven days or less,» you are saying something verifiable, defensible, and auditable.

Furthermore, percentiles make variability visible. In practice, a supplier may average thirty days with a standard deviation of ten. The coefficient of variation, which divides the deviation by the average, results in thirty-three percent. That supplier is not slow: they are unpredictable. Therefore, unpredictability is paid for with safety stock, which is tied-up cash.

💡 Key point: The average describes the center; the percentile describes the engagement. Your customers don't live in the center of your distribution, they live in the tail.

How to calculate QlikSense percentiles with Fractile()

Qlik Sense solves this with a direct and rarely used function: Fractile(). It receives the field and the desired fraction, expressed between zero and one. Thus, these three measures become the starting point of any serious panel of QlikSense percentiles applied to the service.

// P50 — half of the orders are delivered below this value
Fractile(DiasEntrega, 0.5)
// P90 — the commitment you can actually sign with a client
Fractile(DiasEntrega, 0.9)
// P95 — the scenario that makes you lose accounts
Fractile(DiasEntrega, 0.95)

Notice a detail that almost no one respects: Fractile() It is an aggregation function. Therefore, it operates on the set of rows of the current context, not on already averaged values. If you feed it an aggregated metric, you need Aggr(), and we can see that further down.

Shield the universe with Set Analysis

A percentile calculated on dirty data lies more than the average. In fact, canceled orders, credit notes, and records without a delivery date contaminate the entire distribution. That is why it is best to explicitly define the universe.

Percentile(
    {=0"}           // discards inverted dates
    >}
    DiasEntrega, 0.9
)

Each modifier serves a specific function. First, it removes documents that do not represent an actual delivery. Then, it avoids measuring still-open orders, which always seem fast because they are not yet finished. Finally, it discards records where the dispatch date is earlier than the order date, a data entry error more common than anyone admits.

Percentiles on aggregated metrics with AGGR()

Now comes the question that truly matters in a directory: how is profitability distributed among my clients? In that case, you need the percentile of a metric calculated per client, not from a transaction row. That is to say, the QlikSense percentiles they also operate on already aggregated results.

// First quartile of the % margin among clients:
// The 25% in your portfolio yields the same as or less than this
Fractile(
    Aggr(
        Sum({} Margin)
        / RangeMax(Sum({} Sales), 1),
        Client
    ),
    0.25
)

The Aggr() build a virtual table with a percentage margin per customer. Then Fractile() sort those values and return the twenty-five percent cutoff. Also, RangeMax(denominator, 1) act as a safety net: if a customer has zero sales, you prevent a division by zero that would mess up the entire calculation.

Pre-calculate the tail in the script: the step almost no one takes

Seeing the P90 in a KPI is fine. However, a manager doesn't act on a number: they act on a list of cases. That is why the step that separates a decorative dashboard from an operational one is marking, in the script, which orders belong to their own product family's queue.

// ---------- P90 Threshold by Product Line ----------
// Fractile also works in the script with GROUP BY
P90_Threshold:
LOAD
    ProductLine,
    Fractile(DeliveryDays, 0.9) as P90_Line
RESIDENT Orders
GROUP BY ProductLine;
// ---------- Map to apply the threshold row by row ----------
MapP90:
MAPPING LOAD ProductLine, P90_Line RESIDENT P90_Threshold;
// ---------- Tail flag: the 10% that is costing you customers ----------
FlaggedOrders:
LOAD
    *,
    If(DeliveryDays > ApplyMap('MapP90', ProductLine, 9999), 1, 0) as QueueFlag
RESIDENT Orders;
DROP TABLE Orders;
RENAME TABLE MarkedOrders to Orders;

The third argument of ApplyMap() It is deliberate. If a new product line appears without a calculated threshold, it returns nine thousand nine hundred ninety-nine and no order is incorrectly flagged. I prefer a silent false negative over a false alarm that erodes user trust.

With the field FlagCola already in the model, analytics become trivial and extremely fast. Furthermore, all the computational weight of QlikSense percentiles It is resolved upon reloading and not upon the user's click.

// Orders in the queue over the last rolling year
Count({} OrderNo)
// Customers in the queue, ready to be called
Concat(DISTINCT {} CustomerName, ', ')
// Promise gap: what you say minus what actually happens
Fractile(DeliveryDays, 0.9) - Avg(DeliveryDays)

The QlikSense percentiles dashboard I use in operations

Design matters just as much as the formula. That is why my standard layout of QlikSense percentiles It takes up a single page and can be read in five seconds.

At the top are four inline KPIs: P50, P90, P95, and coefficient of variation. The P50 appears in gray, deliberately muted, because it isn't the one that drives the decision. Instead, the P90 has a stoplight indicator against the committed goal. In the center, I place a delivery days histogram with two vertical reference lines at the P50 and the P90; there, the user sees the actual shape of their operation, not a summary. To the right, a scatter plot of volume versus P90 by product line separates the big problems from the noisy ones.

Below is the table that turns the analysis into work: orders with FlagCola = 1, sorted by client and by days delayed past the threshold. Ultimately, that table is the raison d'être of the dashboard. Everything else is context.

Business Impact: From Excuse to Commitment

The first effect is commercial. When QlikSense percentiles they enter the dashboard, you stop promising averages and start promising thresholds. Industry benchmarks place excellent OTIF between ninety-five and ninety-nine percent, while wholesale and B2B distribution usually moves between eighty-eight and ninety-seven percent. Without percentiles you don't know which bracket you're really in, because the average shows you a point and the customer lives a distribution.

The second effect is financial. In practice, variability is paid for with inventory. A supplier whose coefficient of variation rises from fifteen to thirty-five percent over six months forces an increase in safety stock even if their average does not move. That is why detecting that deterioration in time is a quarterly review conversation, not a year-end surprise.

The third effect is cultural, and it is the one that interests me the most. In fact, a team evaluated by average learns to hide its tail. On the other hand, a team evaluated by P90 learns to attack it. It is the same data, with opposing incentives.

Common errors with QlikSense percentiles

These are the four stumbling blocks I see most often when a team implements QlikSense percentiles for the first time.

⚠️ Common error: calculate the percentile over a previous average. Write Percentile(Avg(DiasEntrega), 0.9) it does not return the percentile of the orders: it returns the percentile of a single already flattened number. If you need the percentile of an aggregated metric, use Aggr() with the correct dimension.

Error two: applying percentiles to tiny samples. A P90 based on seven orders means nothing. That is why my rule of thumb requires at least thirty observations per group before showing the value. Otherwise, I hide the row with a condition on Count() and I show only the volume.

Error three: comparing percentiles between groups with different units of measurement. The 90th percentile delivery time for an imported spare part and that of a local stock product are not comparable. Therefore, segment first and compare later.

Error four: replacing the average instead of accompanying it. The average remains useful for calculating capacity and total costs. In fact, the most repeated technical recommendation consists of reporting the median alongside the mean, not replacing one with the other.

Best practices from the trenches

These four rules summarize what has worked for me when carrying QlikSense percentiles to real operations.

First, define the engagement percentile before measuring it. If you choose the threshold after seeing the data, you aren't managing: you're justifying.

Second, save the threshold as a governed variable. Thus, a variable Service Percentile with a value of 0.9, it allows changing the service policy in a single place and maintaining consistency across all application objects.

Third, version the thresholds by period. If in January you committed to seven days and in July to six, your history must remember both. Otherwise, you will judge the past by the rules of the present.

Fourth, always display the sample size along with the percentile. Furthermore, a P90 without its Count() That is an invitation to argue about the number instead of arguing about the cause.

Conclusion: govern the tail, not the center

Trust in data for decision-making has been dropping: distrust went from fifty-five percent in 2023 to sixty-seven percent in the most recent measurements. However, part of that distrust does not come from bad data, but from poorly chosen summaries. When the dashboard says four days and the customer experiences fourteen, the executive does not conclude that the metric is incomplete: they conclude that the dashboard is lying.

Work with QlikSense percentiles fix that without projects, without consultants, and without migrations. It is an aggregation function, a Set Analysis modifier, and a calculated flag in the script. Three things you can have up and running this week.

My challenge to you is concrete. Take the metric you discuss the most in your monthly committee and calculate its P90. Then compare it to the average you've been reporting. If the gap between both numbers surprises you, you've just found the conversation your company wasn't having.

If you want to continue delving into analytics applied to real business decisions, I invite you to check out the rest of the content in the Strategic Circle at hectorpincheira.com, where I publish practical material on BI, data, and tech leadership every week.

Sources consulted: ClickHouse — Percentiles vs averages, Faros.ai — MTTR beyond misleading averages, Speed Commerce — OTIF benchmarks 2026 and SourceDay — Lead time variability.

Most Read

QlikSense Hierarchy: parent-child chart of accounts expanded by levels
QlikSense Hierarchy: the Chart of Accounts That Doesn't Add Up
QlikSense Sum TOTAL: share of each family over the total
QlikSense Sum TOTAL: the Percentage That Changes When You Filter
SAP Business One Inventory Revaluation - featured image of the tutorial
SAP Business One Inventory Revaluation: Fix Wrongly Loaded Costs
Empty chamber with wooden benches: the counterweight that required being present to be used
The Veto You Had to Say in Person: Your Decisions With No Counterweight
SAP Business One customizations - featured image of the pre-upgrade audit tutorial
SAP Business One Customizations: Pre-Upgrade Audit
SAP Business One Customer Concentration - featured image of the tutorial
SAP Business One Customer Concentration: Measure Your Risk with SQL

RELATED ARTICLES