Ask Gemini to Create a Pivot Table

What You Will Learn

You will learn how to ask Gemini to design and help create pivot tables for sales, spend, headcount, margin, customer, or operational analysis.

Required Dataset

Use the BrightLane_Retail_Operations_Dataset.

Use these tabs:

Weekly_Sales

Stores

Customer_Reviews

Create three new tabs:

Pivot_Practice

Pivot_Output

Pivot_Check

Before You Start

Copy relevant fields from Weekly_Sales into Pivot_Practice, including Week Start Date, Store ID, Product Category, Units Sold, Net Sales, Gross Margin Dollars, Transactions, Foot Traffic, Conversion Rate, and Promotion Flag.

Use XLOOKUP to bring in useful store fields from Stores, such as Region, Store Format, and Store Name.

Step-by-Step Instructions

Step 1. Ask Gemini to recommend pivot tables

Use this prompt:

Act as a retail analytics consultant.

Use the Pivot_Practice tab.

Recommend useful pivot tables for analyzing sales, margin, promotions, region performance, store format performance, and customer behavior.

For each pivot table, provide the business question, rows, columns, values, filters, and interpretation caveat.

Review Gemini’s suggestions before creating the pivot tables.

Step 2. Create a sales pivot

Create a pivot table from Pivot_Practice.

Use:

Insert > Pivot table

Place it in Pivot_Output.

Set it up with:

Rows: Region

Columns: Product Category

Values: Sum of Net Sales

Filter: Promotion Flag, optional

This answers: Where is revenue concentrated by region and category?

Step 3. Create a margin pivot

Create another pivot with:

Rows: Product Category

Values: Sum of Net Sales

Values: Sum of Gross Margin Dollars

Calculate margin percentage from totals:

=IFERROR(Total Gross Margin Dollars/Total Net Sales,””)

Do not average row-level margin percentages unless you have a specific reason.

Step 4. Ask Gemini to interpret the output

Use this prompt:

Interpret the pivot tables in Pivot_Output. Identify high-performing regions, strong product categories, margin differences, promotion effects, and caveats. Use cautious language and do not assume causality.

Expected Result

You should have pivot tables that summarize sales and margin by region, product category, promotion status, or store format.

Check Your Work

Confirm that the pivot source range includes all rows, values use the correct aggregation, filters are visible, and margin percentage is calculated from totals.

Optional Extension

Ask Gemini:

Review the Pivot_Output tab and recommend one additional pivot table for customer review, store format, or promotion performance analysis.

How to get started

1

arrow-down-blue

Tell us about your project

2

arrow-down-blue

Interview candidates

(We’ll provide bios within 48 hours on average)

3

Select your consultant and start work

Find a Consultant

or email us at: [email protected]