Dynamic KPI's in Tableau

Dynamic KPIs are essentially numbers that update automatically as new data becomes available. Instead of being locked to a specific date, these KPIs always look at the latest period, so your dashboard stays current without requiring manual updates.

A good example is tracking sales on a week-on-week basis. Say you want to see if your sales this week are better than last week, a dynamic KPI makes that super easy.

You can achieve this with three simple calculations in Tableau using the Superstore sample data.

1) Current week sales

This captures all sales from the latest week in your data.

2) Previous week's sales

Same idea, just shifted back one week.

3) Week-on-week difference

This tells you whether you’re up or down compared to last week.

Orders are slightly different. For Sales, Profit and Quantity, we can just sum the numbers because they’re measures. Orders are based on the Order ID field, which is a dimension.

For this KPI, we wrap both calculations in a COUNTD function to count the distinct orders in each week.

This is an example of current week orders.

For the week-on-week difference, we don't need to wrap the current and previous week's orders in a SUM, as they're already aggregated.

Key Takeaway

By focusing on whole weeks, the KPI is dynamic. Every time you update your data it:

  • Picks up the most recent week
  • Looks at the week before that
  • Calculates the change.

It's a nice way to minimise extra work, no manual filters, no updating dates, your KPI just works.

Author:
Claudina Mukangabo
Powered by The Information Lab
1st Floor, 25 Watling Street, London, EC4M 9BR
Subscribe
to our Newsletter
Get the lastest news about The Data School and application tips
Subscribe now
© 2025 The Information Lab