How to add a formula column?

Add formula

You can create new columns and customize them using the Formula column transform. Zoho DataPrep offers a variety of functions to suit your needs. Click here to know more about the functions.

To create a formula column

1. Click on the Transform menu and select the Formula column option.
2. Provide a name for new column name in the New column name field.
3. You can insert the functions in the Formula field by typing the function names, or use the intelliSense to complete the functions. You can also apply filters and search functions in the Click to insert functions section.
4. You can also click the Formula builder powered by OpenAI ChatGPT tile to generate formula by sending prompts to ChatGPT API. Click here to know more.
5. You can add parameters to the formula, or use intelliSense to choose columns. You can also search for column names in the Click to insert columns section.

6. DataPrep shows a live preview of the changes made to the formula when you click on the Preview button. 
7. Click Apply to apply the changes.

Formula Generator built with OpenAI ChatGPT API

Zoho DataPrep helps you generate formula powered by ChatGPT API, a generative artificial intelligence developed by OpenAI. Using the formula builder, you can enter your data requirements as prompts and the formula will be generated automatically. To enable this feature in your DataPrep organization, go to the OpenAI Integration tab in the Settings page. Click here to know more about enabling OpenAI integrated features. 

Here's a quick promo on the overall integration with OpenAI ChatGPT API. 

Here's a quick demo on the features in Zoho DataPrep powered by OpenAI's ChatGPT API. 

Data Privacy Notice: Zoho DataPrep utilizes OpenAI's ChatGPT API, an external service based in the USA, subject to OpenAI's Terms of Use. Please be aware that the information sent to OpenAI depends on the access provided by you, the user. The data shared with ChatGPT API is based on the features you enable. Details such as column names and/or selected cell data will be shared based on each feature. You can choose to enable or disable each feature based on the level of data you want to share. Therefore, exercise caution while using this service and ensure that the data you provide does not contain confidential or personal information. 

Go to OpenAI Integration in the Settings page to learn more about configuring this integration.

  1. The generative response are coming in from ChatGPT's training data. Accuracy, consistency, and relevance of the response are subjective to the type of prompts and the data available in its training set. 
  2. ChatGPT doesn't respond to prompts about personal information.

To generate formula built with ChatGPT API
1. Click on the Transform menu and select the Formula column option.
2. Click on the Formula builder powered by OpenAI ChatGPT tile to open up the the Formula prompt.

3. Describe the logic of your formula in natural language in the Formula prompt. As you enter the prompt, you can also mention the column names that you want the logic to apply to, and click Generate.

The required formula will be automatically generated in the Generated formula section.

You can get the output column names contextually auto-generated by ChatGPT based on your input prompt.

The Add formula transform is now equipped with a re-try mechanism which gets you the best result out of ChatGPT's response by re-trying the query automatically in a different way if the output data did not match your expectation.

Note: Entering column names within double quotes in the Formula prompt will generally yield better results. Example: "First_Name"

4. You can rephrase the prompt, or add more details till you get the required output. You can also click Customize, if you want to edit the generated formula.

5. Click Preview to see a preview of the changes made to the formula.
6. Click the Apply button to apply the transform.

Here are some sample prompts for you to try out Formula Generator

Here are a few examples using natural language formula prompt:

a) I want to know if the ordered date is a weekday or it was on the weekend to assess when i get maximum orders. Here's the snapshot of the natural language prompt and the auto-generated formula.

b) I wish to get the average cost based on each month the order was received. Here's the snapshot of the natural language prompt and the auto-generated formula.

c) I want to mask credit card information and view only the last 4 digits of it. Here's the snapshot of the natural language prompt and the auto-generated formula. 

d) I want to update the Mobile number of a lead in my CRM sales data. Here's the snapshot of the natural language prompt and the auto-generated formula.


To apply filters

If you want to apply some filters along with this transform, you can use the filters functionality.

1. Click the Filters tab.

2. Click the   icon and add the required columns in the  Filters  section. You can also reorder the filters using the drag and drop method.

3. For every column added, you can select one of the following options from the drop-down:
  1. Actual: This option lets you filter rows based on the actual values in the column. Click here to know more.
  2. Data quality: This option lets you filter rows based on the quality of data in the column. Click here to know more.
  3. Patterns: This option helps you filter rows based on the data patterns in the selected column. Click here to know more.
  4. Seasonal: This option helps you filter rows based on the seasonal parameters such as quarter, month, week, etc. Click here to know more.
  5. Outliers: This option allows you to filter rows based on the outliers present in the data of the selected column. Click here to know more. 
Note: The filter options are displayed based on the datatype of the column added for the filter.

4. When you add more than one filter to the  Filters  section, the logical operators, AND or OR appear next to the filters. You can click to toggle the logical operator between AND and OR.
  1. Using the logical operators, you can combine the conditions and apply logic to determine the rule of precedence. The final expression is displayed in the  Criteria expression  box. You can click  Edit  to alter the default expression using logical operators and parenthesis to specify the precedence or the sequential order as to which condition should be evaluated first. Click  Save  after making the required changes. 
  1. For example, In the expression, ((1 OR 2) AND (3 OR 4)) , at first the condition ( 1 OR 2 ) will be executed and the condition ( 3 OR 4 ) will be executed next. Thirdly, since, the AND operator is used, the filter will be applied when both the conditions are true.
5. You can further drill down to choose specific values based on the filter option selected for each filter, in the next section.


For example, in the above screenshot, the Data quality option is selected for the All columns filter in the Filters section. Based on the selection, further options to filter specific values are displayed in the  All columns (Data quality) section.

6. You can choose to include or exclude the selected items in the last section.

7. If you want to remove all the filters for some reason, you can use the Clear button.

8. A live preview of the filter transform is shown as you make changes. 

9. Click the Apply button to apply the transform along with the filters.


    Zoho CRM Training Programs

    Learn how to use the best tools for sales force automation and better customer engagement from Zoho's implementation specialists.

    Zoho CRM Training
      Redefine the way you work
      with Zoho Workplace

        Zoho DataPrep Personalized Demo

        If you'd like a personalized walk-through of our data preparation tool, please request a demo and we'll be happy to show you how to get the best out of Zoho DataPrep.

        Zoho CRM Training

          Create, share, and deliver

          beautiful slides from anywhere.

          Get Started Now

            Zoho Sign now offers specialized one-on-one training for both administrators and developers.

            BOOK A SESSION

                                You are currently viewing the help pages of Qntrl’s earlier version. Click here to view our latest version—Qntrl 3.0's help articles.

                                    Manage your brands on social media

                                      Zoho Desk Resources

                                      • Desk Community Learning Series

                                      • Digest

                                      • Functions

                                      • Meetups

                                      • Kbase

                                      • Resources

                                      • Glossary

                                      • Desk Marketplace

                                      • MVP Corner

                                      • Word of the Day

                                        Zoho Marketing Automation

                                          Zoho Sheet Resources


                                              Zoho Forms Resources

                                                Secure your business
                                                communication with Zoho Mail

                                                Mail on the move with
                                                Zoho Mail mobile application

                                                  Stay on top of your schedule
                                                  at all times

                                                  Carry your calendar with you
                                                  Anytime, anywhere

                                                        Zoho Sign Resources

                                                          Sign, Paperless!

                                                          Sign and send business documents on the go!

                                                          Get Started Now

                                                                  Zoho TeamInbox Resources

                                                                          Zoho DataPrep Resources

                                                                            Zoho DataPrep Demo

                                                                            Get a personalized demo or POC

                                                                            REGISTER NOW

                                                                              Design. Discuss. Deliver.

                                                                              Create visually engaging stories with Zoho Show.

                                                                              Get Started Now

                                                                                            You are currently viewing the help articles of Sprints 1.0. If you are a user of 2.0, please refer here.

                                                                                            You are currently viewing the help articles of Sprints 2.0. If you are a user of 1.0, please refer here.

                                                                                                  • Related Articles

                                                                                                  • Dataset transforms

                                                                                                    Dataset transform consists of combining and transforming datasets to suit your needs. You can apply the following transforms in a dataset. Deduplicate Row-wise Column-wise Join Append Pivot Unpivot Calculated columns Derive dataset Mark as personal ...
                                                                                                  • Window functions to add formula columns

                                                                                                    A window function is used to perform calculations across a group of rows on a table. This set of rows is termed a window. You can use window functions to perform summations and calculations based on a rolling window of data, relative to the current ...
                                                                                                  • Functions available to add formula columns

                                                                                                    Abs abs(num) Returns the absolute value of the numeric value. Parameters Name Description num Decimal Parameter must be a numeric value from a column or an expression that returns a number. Example Function Result abs(-1) 1 Div ...
                                                                                                  • Window functions to add formula columns

                                                                                                    A window function is used to perform calculations across a group of rows on a dataset. A set of rows is termed a window. You can use window functions to perform summations and calculations based on a rolling window of data, relative to the current ...
                                                                                                  • Derive dataset

                                                                                                    The Derive dataset transform allows you to create a branch of your dataset from the last applied transform in your dataset. The new dataset will have the most recent state of your data with an empty ruleset. To derive dataset 1. Click the Transform ...
                                                                                                    Wherever you are is as good as
                                                                                                    your workplace



                                                                                                      Watch comprehensive videos on features and other important topics that will help you master Zoho CRM.


                                                                                                      Download free eBooks and access a range of topics to get deeper insight on successfully using Zoho CRM.


                                                                                                      Sign up for our webinars and learn the Zoho CRM basics, from customization to sales force automation and more.

                                                                                                      CRM Tips

                                                                                                      Make the most of Zoho CRM with these useful tips.

                                                                                                        Zoho Show Resources