The most important formula in Klipfolio

New users sometimes get frustrated when a Klip or formula in Klipfolio Klips doesn't come together on the first try. Templates look simple, so building a dashboard from scratch feels like it should be just as simple.

It generally isn't. There's a learning curve, and the payoff for climbing it is real: once you understand how a handful of functions work together, you can answer questions from your data that would otherwise take hours to untangle manually.

If you're just getting started, or you want a quick refresher, there are four functions in Klipfolio Klips to learn early: SLICE, SELECT, GROUP/GROUPBY, and LOOKUP.

These Data Manipulation Functions come together into what can fairly be called the single most important formula in Klipfolio Klips.

Here it is:

Klipfolio formula combining LOOKUP, GROUP, SELECT, and SLICE functions to filter data where the Delayed column equals

Data source that it uses:

Spreadsheet showing Southwest region orders from New Mexico and Texas with order IDs, unit quantities, and on-time delivery status

Klip that it built:

Bar chart showing delayed units by U.S. state, with Ohio having the highest count at approximately 5,000

The LOOKUP function

The key to mastering this, and all functions, is understanding parameters. Each function has a set number of parameters. Each parameter expects a certain kind of data and performs a specific action.

Take LOOKUP. It has three parameters, and each one does a distinct job.

LOOKUP

Parameter one: X axis

This is a reference to the X axis of the Klip, containing various states in the U.S. Think of it as a long list of values.

Parameter two:

GROUP and SELECT functions with SLICE operations on columns B and F, filtering for Delayed status

Think of this as a second list of values. In this case, it's not all states (B:B) from the X axis, but only those with an order (F:F) that is Delayed.

Klips logo Level up your decision making

Create custom dashboards for you and your team.

Get started with Klips

Parameter three:

Klipfolio formula showing GROUP BY and SELECT functions with SLICE operations filtering data by Delayed status

Here, you're looking at the states (B:B) that have delayed orders (F:F), and totalling the value (E:E) of those delayed orders.

The LOOKUP function takes a list of values (first parameter), looks for matches in a second list (second parameter), and, where there's a match, returns a corresponding data set (third parameter). In the example, of the 20 states on the X axis, only nine have delayed orders. LOOKUP aligns the numerical data from the series with the correct state on the X axis, so you get an accurate picture without manually reconciling rows.


Parameter one (closer look): X axis

When using LOOKUP to align data to the X axis, parameter one is often a reference to the X axis values. This gives all X axis data and sets up the alignment of numerical data to the correct points. Use a Reference (third button on the formula toolbar, REF) to reuse a formula you built elsewhere in the Klip. It saves time. Note that referencing the X axis recalculates the entire formula, so it's a time-saver, not a performance shortcut.

Parameter two (closer look):

GROUP and SELECT functions with SLICE operations filtering columns B and F where order status equals Delayed

Think of this as a second list of values. Here, it's not all states (B:B) on the X axis, but only those with an order (F:F) that is Delayed.

Parameter two adds some complexity. This data needs to return matches to at least some items on the X axis: states. You only want the states with delayed orders, so use SELECT to specify a simple condition: "F:F = Delayed." If you only use this SELECT statement and leave out GROUP, you're left with this data:

SELECT formula filtering column B by column F equals

Evaluation Results showing 42 items with Tennessee ranked first, followed by Washington appearing five times in positions 2 through 6

You see the 42 items in the data source where the orders are delayed, with many repeating values.

LOOKUP searches for matches in this list and stops once it finds one. So when it arrives at the first record for "Washington," it matches an X axis data point, moves on to the third parameter, and uses the value for that Washington order. It ignores the four other Washington matches and moves to the next state. The result is incomplete data and a chart you can't trust.

This is why GROUP is used.

Klipfolio formula using GROUP, SELECT, and SLICE functions to filter data where the Delayed column equals

Ranked list of nine states with Illinois first, followed by Indiana, Maryland, New York, Ohio, Oregon, and Pennsylvania

With the list of states with delayed orders GROUPed to remove duplicates, LOOKUP can identify a single match per state. The numbers become reliable. That's the point: not just a cleaner formula, but a chart your team can act on.

Parameter three (closer look):

Klipfolio formula using GROUPBY and SELECT functions to filter data where the Delayed column equals

This approach starts with a reference to the X axis (all states), looks for matches in a smaller set that meets a condition (some states), and, where a match is found, runs this formula.

GROUPBY lets you perform calculations on GROUPed data. Here, the goal is to calculate the value of delayed orders totalled by state where delayed orders exist.

GROUPBY uses three parameters: values, measure, and method.

The first parameter in GROUPBY is the data being grouped. Treat this as a rule. Often you can copy the formula from an X axis, or another part of your Klip, and paste it here.

If you look at the complete formula again, the GROUP function is identical to the first parameter of the GROUPBY function (red underlines). Don't include GROUP inside GROUPBY, since GROUPBY performs that calculation. Reuse the entire contents of GROUP.

Klipfolio formula combining LOOKUP, GROUP, GROUPBY, and SELECT functions with SLICE operations to filter delayed orders by state

The second parameter of GROUPBY is very similar, so copying it often makes sense. It's also a SELECT statement, with the same condition.

Remember the three parameters of GROUPBY: (data you are grouping) (data being calculated) (type of calculation, leave blank to SUM by default).

To finish GROUPBY, SELECT the data from E:E (number of units) where F:F (order status) is delayed. The SELECT statement is identical, but swap B:B (from the first part of GROUPBY) for E:E.

Klips logo Level up your decision making

Create custom dashboards for you and your team.

Get started with Klips

Understanding the LOOKUP formula

The formula looks complex at first. Once you understand the number of parameters in each function, and what each parameter needs and does, you can break it into manageable pieces.

How LOOKUP function parameters map to GROUP and GROUPBY functions, with SELECT statements using SLICE conditions on columns B through F

This pattern shows up often when building dashboards in Klipfolio Klips. Master it and you'll spend less time wrestling with formulas and more time reading numbers you can actually trust, whether you're building a Sales Dashboard, tracking delayed orders, or answering a question your team keeps asking manually.

Published 2026-09-02

Klips logo

Build custom dashboards for you and your team.