Skip to main content
Gainsight Inc.

Pivot Task in Data Designer

This article explains admins on how to transform data into a simplified and actionable dataset in Data Designer using the Pivot task.

Pivot Function: Pivot rotates a table-valued expression by turning the unique values from one column in the expression into multiple columns in the output.

Overview

In a dataset, the Pivot task transforms the data available in a single table column into multiple columns in one go. The Pivot task creates a column for every single data value in the table column. This enhances the data summarization process to get better insights into the data.

To use the Pivot functionality, navigate to the Administration > Data Designer > Open a Dataset > click Options > click Pivot.

The following are the key benefits of using the Pivot task:

  • Summarizes data easily
  • Makes data analysis easier
  • Assists in finding data patterns
  • Helps in making decisions faster

Purpose of Pivot Task

The purpose of the Pivot Task is to create a Pivot table that contains the summarization of terabytes (TBs) of raw data into useful information as required by the organization. This helps in making decisions faster.

Consider a scenario where a Customer Success Director (CSD) wants to find patterns on the CTA Types and wants to know which CSMs are interested in which CTA Type.

Using the Pivot task, admins can directly convert the records (values) in the CTA Type Name column (single column) to multiple columns of individual CTA Type Names, grouped by CSM Name.

The following table displays the records of CSM Name and CTA Type Name in two columns. In such scenarios, it is challenging to manually calculate as to which CTA Type Name has the highest number of CTAs, which CSM is more interested in which CTA Type, and so on.

CSM Name CTA Type Name
Avneesh S Activity
Avneesh S Expansion
Rakesh Kondam Lifecycle
Rakesh Kondam Objective
Sandeep Dugar Lifecycle
Sandeep Dugar Lifecycle
Sandeep Dugar Expansion
Sandeep Dugar Expansion
Sandeep Dugar Lifecycle
Sandeep Dugar Lifecycle

The above-mentioned business scenario helps perform the Pivot task that allows Admins to create a column for every CTA Type Name (each data value). In this scenario, the following fields are used:

  • CTA Type Name:
    • Expansion
    • Risk
    • Activity
    • Lifecycle
    • Objective
  • CSM Name

Assume that you already have a dataset in Data Designer with two columns namely, CSM Name and CTA Type Name. To accomplish this use case, you must Pivot on a CTA Type Name field and apply Group By clause on the CSM Name field. When you run preview the dataset, the following table is displayed.

CSM Name Expansion CTAs Risk CTAs Activity CTAs Lifecycle CTAs Objective CTAs
Avneesh S 2 2 2 2 2
Rakesh Kondam 2 2 2 2 2
Sandeep Dugar 6 6 6 6 6

From the above output table, the Customer Success Director can easily understand which CTA Type Name has the highest number of CTAs and which CSM is more interested in which CTA Type.

Pivot Task in Data Designer

This section covers the information on how to create a Pivot task in Data Designer, that transforms data available in a single column to multiple columns.

Create Datasets

To create a Dataset:

  1. Navigate to Administration > Data Designer. You can see the existing list of designs.

    Note: For more information, refer to the Designs Listing Page and Options article listed in the Additional Resources section.
     
  2. Click New Design.

    New Design.png
     
  3. In the Design Name text box, enter the name of your choice.
  4. From the Select Folder dropdown list, select the folder in which you want to add this design if you have already created a folder in the Designs Listing page; otherwise, by default, the design will be saved in the Uncategorized folder.
  5. In the Description textbox, enter the description of your choice [Optional].

    Design.jpg
     
  6. Click Prepare on the bottom right corner of the screen, to save the design and you will be navigated to the Preparation tab.
  7. From the Data Source dropdown menu, select the Matrix Data source. All the objects under the selected Data Source appear.
  8. Drag and drop the Company Object from the Objects list to the data preparation screen.
  9. Select the required fields you want to add to the dataset. In this example, the following fields are added:
    • Company Name
    • CSM Name
  10. Click Select.
  11. Click Save.

Similarly, create another dataset on Salesforce connection data source > Call to Action object with the following fields:

  • CTA Type Name
  • Account Name

For more information on how to create a dataset, refer to the Create Datasets in Data Designer article listed in the Additional Resources section.

Create Merge Task

Datasets are merged in the following ways:

  1. Click Options on the dataset you want to merge. The Call to Action object is selected here.
  2. Click Merge.
  3. Select the required dataset. The Company object is selected here.

Merge.png

After you merge the datasets, a new window with the dataset name ‘Merge’ appears, where you can see Details & Summary, Join, Fields, and Filters tabs.

For more information on how to merge datasets, refer to the Merge section of the Create Datasets in Data Designer article listed in the Additional Resources section.

Create Pivot Task

To create Pivot task:

  1. Click Options on the dataset you want to pivot, and then click Pivot. A new window with the dataset name Pivot on "Merge" appears, where you can see Details & Summary, Pivot, Fields, and Filters tabs.

    Note: Only one pivot can be configured per dataset.
     
  2. From the Select a field to pivot on dropdown list, select the CTA Type Name field.
  3. Click + Add Column and define the pivot field criteria for every single data value. In this example, set the operator as Equals and enter a CTA Type Name.
  4. In the Output Column Label text box, enter the name of your choice.

    Perform steps three and four for every record of CTA Type Name.
  1. Navigate to the Fields tab.
  2. Select the required field on which you want to Group By. In this example, select the CSM Name field checkbox and Group By checkbox.
  3. Click Save.
  4. Click Preview.

So, in this example, a Pivot table is created which summarizes all the CTA Type Names based on the CSM Name. A Customer Success Director can easily understand which CTA Type Name has the highest number of CTAs and which CSM is more interested in which CTA Type.

The arrangement of the columns can vary in the output. To rearrange the columns, drag the column name and drop it at the required position.

Additional Resources

  • Was this article helpful?