---
schema_version: "1"
id: 373e68541499dee8ac6b02b713d777f9b3d00704958ad82d2d6540359a91ef9a
title: Example - Spotlighting Using Calculations
collection: tableau
version: current
locale: en-gb
portal_url: https://docs.salesforce.com/tableau/current/en-gb/pro/desktop/calculations_calculatedfields_ex2spotlighting.md
canonical_url: https://help.tableau.com/current/pro/desktop/en-gb/calculations_calculatedfields_ex2spotlighting.htm
source_site: help.tableau.com
content_type: documentation
content_hash: 14bc7a58461d913f453d75206ab0c740bd5fc30ecad60baba0eaf9675efefab1
description: Example of using a calculation to spotlight discrete thresholds, such as color-coding sales.
---
[Skip to main content](#main-content)

# Example - Spotlighting Using Calculations

Spotlighting is a technique for showing discrete thresholds based on the values of a measure. For instance, you might want to colour-code sales so that those over 10,000 appear green and those below 10,000 appear red. A spotlighting calculation is just a special case of a calculation that results in a discrete measure. A discrete measure is a calculation that is a dependent variable (and therefore a measure), but which results in a discrete result (as opposed to a continuous result). Thus the name discrete measure. Here is an example:

![Calculation dialog showing a formula that uses the IIF function to check whether a condition is met, and returns one value if true, another value if false and an optional third value or NULL if unknown.](/tableau/current/en-gb/pro/desktop/en-gb/Img/calc_spotlight1.png)

The formula in this example defines a discrete measure named Sales Spotlight. Discrete measures always appear with a blue abc icon in the Data pane. Sales Spotlight is classified as a measure in Tableau because it is a function of another measure; it is discrete because it produces discrete values (“Good” and “Bad”). Here is an example of this categorical measure in use:

![A table in a viz showing sales for various categories and sub-categories across three segments: consumer, corporate and home office.](/tableau/current/en-gb/pro/desktop/en-gb/Img/calc_spotlight2.png)

Here, Sales Spotlight is on Colour in the Marks card. It appears with the AGG prefix because it is an aggregate calculation. Values above 10,000 and below 10,000 are assigned different colours.