---
schema_version: "1"
id: a29de354c549907b7c347e565bb578822bb21c8cef9a572cd8beba4cc8e7d814
title: Sample Data Categorization Formulas
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/platform/264-0-0/useful_advanced_formulas_data.md
canonical_url: https://help.salesforce.com/s/articleView?id=platform.useful_advanced_formulas_data.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 849a495f1eb18a426365f2e412eab6c5224c48b9b1ad7218d4d70768ecbd0f17
description: Categorize deals and assets by size and classify products by a keyword in a custom text field.
products:
  - Salesforce Platform
  - Security
release: "264"
---
# Sample Data Categorization Formulas

Categorize deals and assets by size and classify products by a keyword in a custom text field.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: both Salesforce Classic and Lightning Experience</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: <strong>Essentials</strong>, <strong>Group</strong>, <strong>Professional</strong>, <strong>Enterprise</strong>, <strong>Performance</strong>, <strong>Unlimited</strong>, and <strong>Developer</strong> Editions</td></tr></tbody></table>

For details about using the functions included in these samples, see [Formula Operators and Functions](https://help.salesforce.com/s/articleView?id=platform.customize_functions.htm&release=264.0.0&type=5 "Use these operators and functions when building formulas. All functions are available everywhere that you can include a formula, such as formula fields, validation rules, approval processes, and workflow rules, unless otherwise specified.").

## Deal Size Large and Small

This formula displays “Large Deal” for deals over one million dollars or “Small Deal” for deals under one million dollars.

`IF(Sales_Price__c > 1000000,  "Large Deal",  "Small Deal")`

## Deal Size Small

This formula displays Small if the price and quantity are less than one. This field is blank if the asset has a price or quantity greater than one.

```
IF(AND(Price<1,Quantity<1),"Small", null)
```

## Product Categorization

This formula checks the content of a custom text field named Product\_Type and returns Parts for any product with the word “part” in it. Otherwise, it returns Service. The values are case-sensitive, so if a Product\_Type field contains the text “Part” or “PART,” this formula returns Services.

```
IF(CONTAINS(Product_Type__c, "part"), "Parts", "Service")
```