Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Aprenda Calculated Fields and Custom Metrics | Advanced Pivot Table Techniques
Practice
Projects
Quizzes & Challenges
Questionários
Challenges
/
Excel Pivot Tables in Depth v2

bookCalculated Fields and Custom Metrics

Deslize para mostrar o menu

Pivot Tables can calculate totals, averages, and counts automatically. But sometimes you need a custom calculation that doesn't exist in your source data. In this chapter, you'll create calculated fields directly inside a Pivot Table to build your own metrics.

A Calculated Field allows you to create a new formula inside a Pivot Table using existing fields from the dataset. This is useful when:

  • You need profit but only have revenue and cost;
  • You need commission based on sales;
  • You need percentage-based adjustments;
  • You want to simulate business rules.

A calculated field does not change the source data. It exists only inside the Pivot Table.

Creating a Calculated Field

To insert a Calculated Field:

  1. Click inside the Pivot Table;
  2. Open the PivotTable Analyze tab;
  3. Click Fields, Items & Sets;
  4. Select Calculated Field;
  5. Enter:
    • A name for the new field;
    • A formula using existing field names.
  6. Click Add or OK.

The new field becomes available in the Pivot Table and is added to the Values area.

carousel-imgcarousel-imgcarousel-imgcarousel-imgcarousel-img
Note
Note

You can only use field names, not cell references.

Formulas work on aggregated data.

Calculated fields apply the formula to each record before aggregation.

Create a Pivot Table with:

  • Rows: Category;
  • Values: Sum of Revenue;
  • Values: Sum of Cost;

Create a Calculated Field:

  • Name: Profit;
  • Formula: = Revenue - Cost.

Create another Calculated Field:

  • Name: Profit Margin;
  • Formula: = (Revenue - Cost) / Revenue.
Tudo estava claro?

Como podemos melhorá-lo?

Obrigado pelo seu feedback!

Seção 3. Capítulo 1

Pergunte à IA

expand

Pergunte à IA

ChatGPT

Pergunte o que quiser ou experimente uma das perguntas sugeridas para iniciar nosso bate-papo

Seção 3. Capítulo 1
some-alt