---
schema_version: "1"
id: 83ff2da27a088e82568fd5a1e3b3e0717c9c64a5ec0ddbc35dc90e074aa02733
title: MDP Use the Formula Editor to Map
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/mktg/264-0-0/mcidp_data_mapping_formula.md
canonical_url: https://help.salesforce.com/s/articleView?id=mktg.mcidp_data_mapping_formula.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 58473aed39e0bcc722956d9713258228029d6831e2341328c39c6c6e7571624a
description: You can apply formulas directly to your field mappings to perform complex manipulations of your data. The formulas are intuitive and use a similar syntax found in Excel. For more complex manipulations, you can also use MVEL, a Java-based expression language. You apply formulas during the mapping stage when creating data streams.
products:
  - Marketing
  - Marketing Cloud Intelligence
release: "264"
---
# MDP Use the Formula Editor to Map

You can apply formulas directly to your field mappings to perform complex manipulations of your data. The formulas are intuitive and use a similar syntax found in Excel. For more complex manipulations, you can also use MVEL, a Java-based expression language. You apply formulas during the mapping stage when creating data streams.

1. Navigate to the **Import** tab.
2. Expand **Data Streams List**.
3. Create a data stream or edit an existing one.
4. At the bottom of the Data Stream page, click **Map to Model**.

The Formula Editor contains these areas:

![using the formula editor](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-mktg-mcidp-264-0-0-production-enus/6ea21a7c-b623-43b5-9bb1-3174d8e8301e/mcidp/images/data_mapping_formula.png)

1. Edit Area — Enter the formula. You can type your formula manually or select one from the available functions or fields.
2. Functions/Fields — Select a function or field from the list. These types are available:
    
    - **Functions** – A list of available functions that can be implemented on dimensions, measurements, native values, and variables.
    - **External fields** – A list of all fields from the source file that were uploaded to the data stream.
    - **Data model fields** – A list of all fields available in the data stream type of the chosen data stream, listed with their system native name. These fields can be used with dimensions or measurements that already have a formula in the mapping. A value is given after the formula is processed instead of the native CSV value from the original file. This value enhances ETL performance because it doesn’t require more processing.
    
    ![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-mktg-mcidp-264-0-0-production-enus/6ea21a7c-b623-43b5-9bb1-3174d8e8301e/images/icon_note.png)
    
    Note Only mapped fields can be used as MDP fields.
    
    The practical difference between the two types of fields in the mapping stage is:
    
    - `Csv[…] =pre-formula` — Refers to the external fields and appears in this format. The value is taken as it exists in the source file before any formula manipulations were performed.
    - `Dat[…] = post-formula` — Refers to the MDP field and appears in this format. This field takes the value after the formula is applied. For example, if you map Media Buy Name, you can use `dat[media_buy_name]` in another field formula without writing or evaluating it again.
3. Additional Options – These options are also available:
    
    - **Auto Format Code** – Formats your code into the standard structure.
        
        _Before Auto Format:_
        
        ![show formula before auto format](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-mktg-mcidp-264-0-0-production-enus/6ea21a7c-b623-43b5-9bb1-3174d8e8301e/mcidp/images/data_mapping_before_af.png)
        
        _After Auto Format_
        
        ![shows formula editor after auto format](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-mktg-mcidp-264-0-0-production-enus/6ea21a7c-b623-43b5-9bb1-3174d8e8301e/mcidp/images/data_mapping_after_af.png)
    - **Comment Out** — Allows you to mark a comment in the code for the formula. This code is processed, even if it has dimensions or measurements.
    - **Ucomment** — Allows you to remove the comment from the code.
    - **Validate Syntax** — Ensures that your syntax is free of errors.
    - **Evaluate** — Runs the code on manually entered values.
    
    ![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-mktg-mcidp-264-0-0-production-enus/6ea21a7c-b623-43b5-9bb1-3174d8e8301e/images/icon_note.png)
    
    Note
    
    - Function syntax and the values inserted in the formula are case-sensitive.
    - VLOOKUP functions aren’t supported.