---
schema_version: "1"
id: 3d82ff81b1201efea90b674be6baf05b167667247eb216e857920fe4633d98a2
title: Example - Spotlighting Using Calculations
collection: tableau
version: current
locale: en-us
portal_url: https://docs.salesforce.com/tableau/current/en-us/public/desktop/calculations_calculatedfields_ex2spotlighting.md
canonical_url: https://help.tableau.com/current/public/desktop/en-us/calculations_calculatedfields_ex2spotlighting.htm
source_site: help.tableau.com
content_type: documentation
content_hash: ad643a5a717850a3491b2240c1469e2cf92c69fd230fbab7c8cf8b6ce142a61e
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 color-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-us/public/desktop/en-us/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-us/public/desktop/en-us/Img/calc_spotlight2.png)

Here, Sales Spotlight is on Color 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 colors.