Power BI Exercise - Building a Simple Star Schema (Retail Dataset)

Power BI Exercise - Building a Simple Star Schema (Retail Dataset)

Transform the flat retail dataset into a clear, reusable semantic model.

In this guided exercise, you will improve the retail semantic model by separating descriptive fields into Product, Region, and Channel dimension tables. You will then create one-to-many relationships, hide duplicate fact-table fields, and confirm that all sales measures still return the correct values.

Learning goal: understand the different jobs performed by fact and dimension tables and build a clear star-shaped model around the Sales table.
Star schemaFact tableDimensionsRelationships

What is a star schema?

A star schema separates tables according to their purpose:

  • Fact tables store business events and numeric values to summarize. In this model, Sales is the fact table.
  • Dimension tables describe business entities and provide fields for filtering and grouping. Examples include Date, Product, Region, and Channel.
Retail star schema The Date, Product, Region, and Channel dimensions each have a one-to-many, single-direction relationship to the central Sales fact table. Date Date Year · Month · Day DimProduct Product Category 15 unique products Sales FACT TABLE SaleID · SaleDate Quantity · UnitPrice SalesAmount DimRegion Region 4 sales regions DimChannel Channel Online · Store 1* 1* 1* 1*

1 = unique dimension value   ·   * = multiple Sales rows   ·   arrows show single-direction filtering

Each dimension sits on the one side of a relationship. Sales sits on the many side because a product, region, channel, or date can appear in many transactions.

Before you begin

Complete the previous Date-table exercise first. Your model should contain:

  • A Sales table containing 15 transactions
  • A marked Date table related to Sales[SaleDate]
  • The measures [Total Sales], [Total Quantity], and [Transaction Count]
Control totals: Total Sales = 21,788, Total Quantity = 42, and Transaction Count = 15.

Step 1: Create the Product dimension

  1. On the Modeling ribbon, select New table.
  2. Enter the following DAX expression.
DimProduct =
SUMMARIZE (
    Sales,
    Sales[Product],
    Sales[Category]
)

SUMMARIZE creates one row for each unique Product and Category combination. The sample dataset should produce 15 product rows.

Why include Category? Category describes the product. Keeping Product and Category together creates one reusable product dimension and avoids a separate one-column Category table for this small model.

Step 2: Verify that Product is unique

  1. Open Data view.
  2. Select DimProduct.
  3. Confirm that every product appears once.
  4. Confirm the table contains 15 rows.

The Product column must be unique because it will form the one side of the relationship.

Step 3: Create the Region dimension

Create another calculated table:

DimRegion =
DISTINCT ( Sales[Region] )

The expected four rows are Central, East, North, and South.

Step 4: Create the Channel dimension

DimChannel =
DISTINCT ( Sales[Channel] )

The expected two rows are Online and Store.

Step 5: Create the relationships

Open Model view and create the following active relationships:

One sideMany sideCardinalityFilter direction
DimProduct[Product]Sales[Product]One to many (1:*)Single
DimRegion[Region]Sales[Region]One to many (1:*)Single
DimChannel[Channel]Sales[Channel]One to many (1:*)Single

Your existing Date relationship should remain:

Date[Date]  1 ---- *  Sales[SaleDate]
Use single-direction filtering: filters should flow from each dimension into Sales. Do not enable Both unless a specific model requirement has been tested and justified.

Step 6: Organize the model diagram

  1. Place the Sales table in the centre.
  2. Arrange Date, DimProduct, DimRegion, and DimChannel around Sales.
  3. Confirm each relationship line displays 1 beside the dimension and * beside Sales.
  4. Confirm every relationship is shown as a solid line, indicating that it is active.

Step 7: Hide duplicate descriptive columns

Report authors should use dimension fields for slicing and grouping. In Model view, right-click and choose Hide in report view for:

  • Sales[Product]
  • Sales[Category]
  • Sales[Region]
  • Sales[Channel]

Do not delete these columns. They are still required as relationship keys in this learning model.

Result: report authors see one clear version of Product, Category, Region, and Channel. Numeric transaction fields and measures remain associated with Sales.

Step 8: Rebuild the slicers with dimension fields

  1. Replace the existing Product or Category slicer with DimProduct[Product] or DimProduct[Category].
  2. Replace the Region slicer with DimRegion[Region].
  3. Replace the Channel slicer with DimChannel[Channel].
  4. Keep using columns from the Date table for date filtering.

Your existing measures do not need to be rewritten. Dimension selections travel through the relationships and filter the Sales rows evaluated by each measure.

Step 9: Validate category results

Open DAX Query View and run:

EVALUATE
SUMMARIZECOLUMNS (
    DimProduct[Category],
    "Total Sales", [Total Sales],
    "Total Quantity", [Total Quantity],
    "Transactions", [Transaction Count]
)
ORDER BY DimProduct[Category]
CategoryTotal SalesTotal QuantityTransactions
Computing5,959114
Entertainment5,89373
Home4,77194
Mobile5,165154

Step 10: Validate region and channel filters

Region results

RegionExpected Total Sales
Central9,281
East3,078
North2,734
South6,695

Channel results

ChannelExpected Total Sales
Online6,545
Store15,243

Step 11: Test combined filtering

  1. Select Central in the Region slicer.
  2. Select Computing in the Category slicer.
  3. Confirm Total Sales is 4,997.
  4. Keep Central selected and change Category to Home.
  5. Confirm Total Sales is 2,185.

Multiple dimension filters combine using AND logic. A Sales row must satisfy every active selection to contribute to the result.

Model design note

This guided exercise uses DAX calculated tables to make the star-schema transformation easy to reproduce. In a production model, dimension tables are commonly prepared in a data warehouse or Power Query so data quality, keys, refresh behavior, and large data volumes can be managed more deliberately.

Knowledge check

  1. Which table is the fact table, and what is its row-level grain?
  2. Why must a dimension key contain unique values?
  3. Why should report slicers use dimension fields?
  4. What does the 1:* symbol mean?
  5. How does selecting Central and Computing affect the Sales table?

Troubleshooting

ProblemWhat to check
Power BI creates a many-to-many relationship.Check for duplicate or blank values in the intended dimension key.
A slicer does not change Total Sales.Confirm the slicer uses a dimension column and that its relationship to Sales is active.
Category totals are incorrect.Confirm each product maps to one category and that DimProduct contains 15 unique products.
Duplicate field names confuse report authors.Hide the descriptive fields in Sales and use dimension fields in visuals.
A relationship line is dashed.Edit the relationship and make it active, provided this does not create an ambiguous path.

Exercise complete

You have converted the flat retail table into a simple star schema. Product, Region, Channel, and Date now provide consistent filtering and grouping, while Sales remains responsible for transaction-level values and measures.
Completion checklist
  • DimProduct contains 15 unique products and their categories.
  • DimRegion contains four regions.
  • DimChannel contains two channels.
  • All four dimensions have active one-to-many relationships to Sales.
  • Slicers use dimension fields.
  • All control totals match the expected results.

References

Excel Advanced - Building an Excel Dashboard

Lesson 10: Building an Excel Dashboard
0 of 8 activities completed
Microsoft Excel Advanced · Lesson 10

Building an Excel Dashboard

Combine validated KPIs, PivotCharts, slicers and a timeline into a focused one-page management dashboard that answers business questions at a glance.

150-minute lesson120 sales records8 guided activitiesMixed Excel versions

Learning outcomes

Plan the dashboardDefine the audience, questions, KPIs and visual hierarchy before formatting.
Build reliable KPIsLink summary cells to PivotTables and preserve currency and percentage formats.
Coordinate interactionConnect slicers and a timeline to compatible PivotTables and PivotCharts.
Deliver one clear pageAlign objects, reduce clutter, test filters and write an evidence-based conclusion.

Download the practice dataset

This lesson continues with the same 120 fictional transactions used in Lessons 8 and 9. The generated workbook contains Sales Data, Dashboard Plan and Controls sheets.

120orders
RM146,236revenue
RM56,646profit
38.7%profit margin
Recommended workflow: convert Sales Data into an Excel Table named tblSales. Keep raw data, PivotTables and the dashboard on separate worksheets so the presentation layer stays clean.

1. Define the management questions

ACTIVITY 1

Write a dashboard brief

Assume the audience is a sales manager who needs a monthly performance overview. Write the questions before choosing charts:

  1. How much revenue and profit have we generated?
  2. What is the overall profit margin and average order value?
  3. Which region contributes the most revenue?
  4. How does revenue change by month?
  5. Which product category produces more profit?
  6. How do results change by Channel and reporting period?
Dashboard discipline: a dashboard is not a collection of every available chart. Each object must answer a named business question.

2. Audit and prepare the source

ACTIVITY 2

Validate the dashboard foundation

  1. Open Sales Data and confirm one header row and 120 uninterrupted records.
  2. Check that Date values are real dates and financial fields are numbers.
  3. Press Ctrl+T, confirm My table has headers and name the Table tblSales.
  4. Create a worksheet named Dashboard and another named Pivot Support.
  5. Build all supporting PivotTables on Pivot Support, not on the dashboard.
ControlExpected
Orders120
RevenueRM146,236
ProfitRM56,646
Average order valueRM1,218.63
Profit margin38.7%

3. Build KPI cards

ACTIVITY 3

Create five executive measures

  1. Create a one-cell PivotTable value for Total Revenue and another for Total Profit.
  2. Create an Order Count using Sale ID in Values and set it to Count.
  3. Calculate Average Order Value as Revenue ÷ Orders.
  4. Calculate Profit Margin as Profit ÷ Revenue.
  5. On Dashboard, link each card to its supporting value. Excel may create GETPIVOTDATA automatically.
  6. Apply RM, whole-number and percentage formats appropriately.
RM146,236Total Revenue
RM56,646Total Profit
120Orders
RM1,218.63Average Order Value
38.7%Profit Margin
Example formulas

If Revenue is in B4, Profit in B5 and Orders in B6, use =B4/B6 for average order value and =IFERROR(B5/B4,0) for margin. Prefer references or GETPIVOTDATA rather than typing totals into the dashboard.

4. Create the supporting visuals

ACTIVITY 4

Build three PivotCharts

  1. Revenue by Region: Region in Rows, Revenue in Values, Clustered Column chart.
  2. Monthly Revenue Trend: Date grouped by Month in Rows, Revenue in Values, Line with Markers chart.
  3. Profit by Category: Category in Rows, Profit in Values, Clustered Bar chart.
  4. Give every chart an informative title and apply RM formatting to value axes.
  5. Remove legends from single-series charts and hide PivotChart field buttons for presentation.

Validation: North revenue is RM59,679; Furniture profit is RM34,668; Accessories profit is RM21,978.

Keep the connection: move or copy the PivotCharts to Dashboard, but retain their supporting PivotTables on Pivot Support.

5. Add slicers and a timeline

ACTIVITY 5

Coordinate dashboard filters

  1. Select a PivotTable and insert a Channel slicer.
  2. Insert a Date timeline and set its level to Months or Quarters.
  3. Open Report Connections or PivotTable Connections for each control.
  4. Select every compatible PivotTable used by the KPIs and charts.
  5. Test Corporate, Online, Retail, multi-select and Clear Filter.
  6. Test several date periods and confirm every connected object updates.

Unfiltered channel totals: Corporate RM56,728; Online RM50,154; Retail RM39,354.

If a connection is missing: the PivotTables may use different sources or caches. Recreate them from the same tblSales Table.

6. Arrange the one-page layout

ACTIVITY 6

Build a visual hierarchy

Set View → uncheck Gridlines, then use this layout as a starting point:

Dashboard title and reporting period
Revenue KPI
Profit KPI
Orders KPI
Margin KPI
Monthly Revenue Trend
Revenue by Region
Profit by Category
Channel slicer
Date timeline
Management conclusion
  1. Use one consistent outer margin and spacing rhythm.
  2. Make KPI cards equal in size and align chart edges.
  3. Keep slicers away from titles, labels and plotted data.
  4. Use Selection Pane to rename and manage overlapping objects.

7. Apply dashboard design standards

ACTIVITY 7

Make the page presentation-ready

Use
One font family, one accent colour, short titles, aligned objects and consistent RM formats.
Avoid
3-D charts, decorative gauges, excessive borders, rainbow colours and duplicated legends.
  1. Use a white or very light background with dark text.
  2. Reserve one accent colour for emphasis and filter selection.
  3. Keep chart scales honest; do not truncate axes to exaggerate differences.
  4. Add Alt Text to charts and ensure colour is not the only meaning cue.
  5. Set the dashboard print area and choose Landscape orientation with Fit Sheet on One Page.

8. Test, conclude and hand over

ACTIVITY 8

Complete the dashboard acceptance test

  1. Use Data → Refresh All and confirm all totals still reconcile.
  2. Apply each Channel selection and at least three date periods.
  3. Clear every filter and confirm the unfiltered KPIs return.
  4. Add one new test transaction to tblSales, refresh, confirm inclusion, then remove the test row.
  5. Check the dashboard at 100% zoom and in Print Preview.
  6. Write a concise management conclusion and a recommended follow-up question.
Example conclusion: North is the strongest region by revenue, while Furniture contributes more profit than Accessories. Management should filter by Channel and month to determine whether these results are broad-based or concentrated in a few periods.

Handover note: record the source Table name, refresh procedure, reporting period, control totals and Excel-version limitations.

Troubleshooting

KPI does not change
Link it to the PivotTable result or GETPIVOTDATA and connect that PivotTable to the filter.
Timeline will not appear
Confirm the source field contains valid dates. Timelines require Excel 2013 or later.
New rows are missing
Use tblSales as the source, then choose Refresh All.
Objects move or resize
Use Size and Properties to control placement and align objects from the Shape Format tab.

Knowledge check

1. Why keep PivotTables away from the dashboard sheet?

It separates calculations from presentation, reduces clutter and makes maintenance safer.

2. Why should KPI cards link to cells instead of containing typed totals?

Linked values update after refresh and filtering; typed totals become stale.

3. What must be true for one slicer to control several PivotTables?

The PivotTables must use a compatible shared source or PivotCache and be selected in Report Connections.

4. What is the final dashboard quality test?

It must reconcile, refresh, respond correctly to controls, remain readable and support a clear business conclusion.

Completion checklist

  • Source: tblSales with 120 records
  • KPI cards: Revenue, Profit, Orders, Average Order Value and Margin
  • Charts: regional comparison, monthly trend and category profit
  • Controls: Channel slicer and Date timeline
  • Layout: one-page management dashboard
  • Quality: refresh-tested, reconciled, accessible and print-ready
  • Insight: written conclusion and follow-up question

Extension complete: Lesson 10 turns the analytical components from Lessons 8 and 9 into a maintainable executive dashboard.

Lesson 10 · Building an Excel Dashboard · Excel Advanced

Excel Advanced - Charting Pivoted Data

Lesson 09: Charting Pivoted Data
0 of 8 activities completed
Microsoft Excel Advanced · Lesson 09

Charting Pivoted Data

Turn connected PivotTable summaries into clear, interactive PivotCharts and assemble a compact management view that responds to filters and slicers.

120-minute lesson120 sales records8 guided activitiesMixed Excel versions

Learning outcomes

Create PivotChartsBuild charts that remain connected to their PivotTables and source data.
Match chart to questionUse column, line and bar charts for comparisons, trends and rankings.
Interact with dataFilter charts through field buttons, report filters and connected slicers.
Build a management viewArrange a PivotTable, PivotChart, slicer and written conclusion on one page.

Download the practice dataset

This lesson continues with the same 120 fictional transactions used in Lesson 8. The generated workbook contains Sales Data, PivotChart Tasks and Controls sheets.

120records
RM146,236revenue
RM56,646profit
12months
Recommended workflow: open the workbook in desktop Excel, convert Sales Data to a Table named tblSales, and place each practice PivotTable or dashboard on a new worksheet.

1. Create revenue by region

ACTIVITY 1

Build the supporting PivotTable

  1. Select a cell in Sales Data and choose Insert → PivotTable.
  2. Place the report on a new sheet named PC Revenue Region.
  3. Drag Region to Rows and Revenue (RM) to Values.
  4. Confirm Value Field Settings uses Sum and apply an RM number format.
  5. Reconcile the Grand Total to RM146,236.
RegionRevenue
CentralRM30,090
EastRM12,682
NorthRM59,679
SouthRM43,785

2. Revenue by region PivotChart

ACTIVITY 2

Create a clustered column chart

  1. Click inside the regional PivotTable.
  2. Choose PivotTable Analyze → PivotChart, then select Clustered Column.
  3. Change the title to Revenue by Region.
  4. Remove the legend because the chart contains only one series.
  5. Apply an RM number format to the vertical axis and add data labels.
  6. Test a field filter and confirm that both PivotTable and PivotChart update.
Why column? The regions are discrete categories, and their vertical columns make differences in magnitude easy to compare.

3. Monthly revenue trend

ACTIVITY 3

Use a line PivotChart with a Region filter

  1. Create a PivotTable with Date in Rows and Revenue in Values.
  2. Group Date by Months; add Years if the data may later span multiple years.
  3. Place Region in Filters.
  4. Insert a Line with Markers PivotChart.
  5. Title it Monthly Revenue Trend and format the value axis as RM.
  6. Choose each Region from the filter and observe the changing trend.
If dates will not group: remove blanks, text-formatted dates or invalid entries from the source Date column, then refresh.

4. Profit by category

ACTIVITY 4

Create a ranked bar PivotChart

  1. Create a PivotTable with Category in Rows and Profit (RM) in Values.
  2. Sort the profit values Largest to Smallest.
  3. Insert a Clustered Bar PivotChart.
  4. Title it Profit by Category.
  5. Format the horizontal axis and labels as RM.
CategoryProfit
FurnitureRM34,668
AccessoriesRM21,978

A bar chart gives category names more horizontal room and works well for ranked comparisons.

5. Work with PivotChart fields

ACTIVITY 5

Change the analytical question

  1. Select the Revenue by Region PivotChart and open its field list.
  2. Drag Channel to Legend (Series) to compare channel composition.
  3. Move Channel to Filters and note how the chart changes.
  4. Return Channel to Legend (Series).
  5. Use Chart Design → Change Chart Type to compare Clustered and Stacked Column.
Axis (Categories)
Region
Legend (Series)
Channel
Values
Sum of Revenue
Filters
Optional

Channel totals: Corporate RM56,728; Online RM50,154; Retail RM39,354.

6. Connect a Channel slicer

ACTIVITY 6

Control several reports from one filter

  1. Select a compatible PivotTable and choose PivotTable Analyze → Insert Slicer.
  2. Select Channel and apply a clear slicer style.
  3. Right-click the slicer and open Report Connections or PivotTable Connections.
  4. Select the regional and monthly PivotTables that share the same source.
  5. Test Online, Corporate, Retail, multi-select and Clear Filter.
Connection unavailable? PivotTables created from different ranges or PivotCaches may not share a slicer. Recreate them from the same Excel Table.

7. Format for business communication

ACTIVITY 7

Reduce clutter and strengthen the message

  1. Use an informative title that states the measure and dimension.
  2. Format financial axes with RM and sensible display units.
  3. Keep only necessary legends, labels and gridlines.
  4. Use one restrained colour family and one highlight colour.
  5. Hide field buttons for presentation: PivotChart Analyze → Field Buttons → Hide All.
  6. Add Alt Text through the chart formatting pane where supported.
Field buttons: keep or hide?

Keep them while learners explore the chart. Hide them in a finished dashboard when a slicer or clearly labelled report filter already provides interaction.

8. Final challenge: one-page management view

ACTIVITY 8

Assemble and test a compact dashboard

  1. Create a worksheet named Management View.
  2. Position one PivotTable, one PivotChart and the Channel slicer without overlaps.
  3. Add the heading Sales Performance Dashboard and a short reporting-period subtitle.
  4. Align objects and make spacing consistent.
  5. Test every slicer selection and refresh the source.
  6. Write a one- or two-sentence conclusion beneath the visual.
Example conclusion: North produces the highest overall revenue. Furniture generates more profit than Accessories, so management should examine whether the category’s performance is consistent across channels.

Completion standard: the chart remains connected to its PivotTable; field and slicer changes update the visual; titles, legends and axes remain readable.

Troubleshooting

PivotChart option is unavailable
Click inside a PivotTable first, then choose PivotTable Analyze → PivotChart.
Chart shows Count of Revenue
Convert source values to numbers, refresh and choose Sum in Value Field Settings.
Slicer does not affect a chart
Connect it to the supporting PivotTable through Report Connections.
Chart misses new records
Expand the source or use an Excel Table, then Refresh All.

Knowledge check

1. What makes a PivotChart different from a normal chart?

A PivotChart is connected to a PivotTable and responds to pivot field changes, filters and compatible slicers.

2. Which chart best communicates a monthly trend?

A line chart, because the connected points emphasise movement through ordered time periods.

3. Why might one slicer fail to connect to another PivotTable?

The PivotTables may not share the same source or compatible PivotCache.

4. Should a finished chart keep every label and field button?

No. Keep only elements that help the reader interpret or interact with the result.

Completion checklist

  • Clustered column chart: Revenue by Region
  • Line chart: Monthly Revenue Trend
  • Bar chart: Profit by Category
  • Interactive control: Channel slicer
  • Financial axes: RM number format
  • Final output: one-page management view with a written conclusion

Course complete: you have progressed from dependable formulas and organised source data to advanced analysis, PivotTables and interactive PivotCharts.

Lesson 09 · Charting Pivoted Data · Excel Advanced

Excel Advanced - Pivoting Data

Lesson 08: Pivoting Data
0 of 8 activities completed
Microsoft Excel Advanced · Lesson 08

Pivoting Data

Rearrange one dependable dataset into different analytical views without rewriting formulas, then filter the results interactively with slicers and timelines.

150-minute lesson120 sales records8 guided activitiesMixed Excel versions

Learning outcomes

Create PivotTablesSelect a clean source and place fields in Rows, Columns, Values and Filters.
Analyse flexiblySort, filter, drill down, group dates and change value calculations.
Maintain accuracyRefresh after source changes and verify the source range.
Filter interactivelyAdd slicers and timelines that make analytical views easy to explore.

Download the practice dataset

The page reconstructs the original 120 fictional transactions used throughout the course. The generated workbook contains Sales Data, Pivot Tasks and Controls sheets.

120records
RM146,236revenue
RM56,646profit
12months
Recommended workflow: download the Excel-compatible file, save a working copy and create PivotTables on new worksheets. Ensure Excel recognises Date as a real date and all currency fields as numbers.

1. Prepare the PivotTable source

ACTIVITY 1

Audit the source before pivoting

  1. Open Sales Data and select a cell within A4:P124.
  2. Confirm one header row, 120 uninterrupted records and no merged cells or subtotal rows.
  3. Check that Date contains real dates and Revenue, Cost and Profit contain numbers.
  4. Optionally press Ctrl+T and name the Table tblSales; a Table expands more safely when new records are added.

Controls: 120 records, Revenue RM146,236 and Profit RM56,646.

Source-data finding: the task sheet says “three categories,” but this exact 120-row source contains two populated categories: Accessories and Furniture. A PivotTable correctly reports the data that exists.

2. First PivotTable: revenue by region

ACTIVITY 2

Create and rearrange fields

  1. Choose Insert → PivotTable and verify the full source.
  2. Place the PivotTable on a new worksheet named PT Revenue Region.
  3. Drag Region to Rows and Revenue (RM) to Values.
  4. Open Value Field Settings and confirm Sum, not Count.
  5. Format the values as RM through Value Field Settings → Number Format.
Rows
Region
Columns
Values
Sum of Revenue
Filters
RegionRevenue
CentralRM30,090
EastRM12,682
NorthRM59,679
SouthRM43,785
Grand TotalRM146,236

3. Profit by category

ACTIVITY 3

Summarise and sort category profit

  1. Create another PivotTable from the same source.
  2. Place Category in Rows and Profit (RM) in Values.
  3. Sort Sum of Profit Largest to Smallest.
  4. Double-click a value to drill down into the transactions behind it; Excel creates a detail sheet.
CategoryProfit
FurnitureRM34,668
AccessoriesRM21,978
Grand TotalRM56,646

4. Monthly revenue and date grouping

ACTIVITY 4

Group dates into months and quarters

  1. Place Date in Rows and Revenue in Values.
  2. Right-click any date and choose Group.
  3. Select Months and Quarters; include Years if the source may later span several years.
  4. Add Region to Filters.
  5. Expand or collapse the quarter hierarchy.

Checkpoint: the PivotTable shows all 12 months and still totals RM146,236.

If Group is unavailable: look for blanks, text-formatted dates or invalid entries in the Date column. Every source value must be a valid date.

5. Channel mix

ACTIVITY 5

Use both Rows and Columns

  1. Place Channel in Rows.
  2. Place Region in Columns.
  3. Place Revenue in Values.
  4. Move Region from Columns to Filters and observe how the question changes.
  5. Restore Region to Columns.

Row totals: Corporate RM56,728; Online RM50,154; Retail RM39,354.

This exercise demonstrates “pivoting”: moving a field changes the report structure without altering the source.

6. Average order value and Show Values As

ACTIVITY 6

Change the value calculation

  1. Place Region in Rows and Revenue in Values.
  2. Open Value Field Settings → Summarise Values By → Average.
  3. Rename the field Average Order Value.
  4. Add Revenue to Values a second time.
  5. For the second copy, use Show Values As → % of Grand Total.

Average order values: Central RM1,003.00; East RM422.73; North RM1,989.30; South RM1,459.50.

Other useful “Show Values As” choices

Difference From compares periods; % Difference From shows growth; Rank Largest to Smallest identifies top performers; Running Total creates cumulative analysis.

7. Refresh, source changes and formatting

ACTIVITY 7

Maintain the PivotTable

  1. Edit one Revenue value in Sales Data and note that the PivotTable does not update immediately.
  2. Right-click the PivotTable and choose Refresh.
  3. Undo the test change and refresh again.
  4. Use PivotTable Analyze → Change Data Source to verify all records are included.
  5. Compare Compact, Outline and Tabular report layouts.
  6. Apply a restrained style, clear field names and RM number formats.
Best practice: use an Excel Table as the source and select “Refresh data when opening the file” when appropriate. Refresh does not automatically expand a fixed range.

8. Slicers and timelines

ACTIVITY 8

Add interactive filters

  1. Select a PivotTable and choose PivotTable Analyze → Insert Slicer.
  2. Add a Channel slicer and test multi-select and Clear Filter.
  3. Choose Insert Timeline and select Date.
  4. Switch the timeline between Months and Quarters.
  5. Use Report Connections or PivotTable Connections to connect the slicer to compatible PivotTables.
Version note: timelines require Excel 2013 or later. In older versions, use grouped Date fields or a report filter. Menu names can differ slightly across releases.

Troubleshooting

Numbers counted, not summed
The source may contain text. Convert the field to numbers, refresh and choose Sum.
Dates will not group
Remove blank, text or invalid dates, then refresh.
New records are missing
Change the source range or use an Excel Table and refresh.
Slicer controls one PivotTable only
Use Report Connections; PivotTables must share a compatible cache/source.

Knowledge check

1. Does a PivotTable change the source data?

No. It summarises a cached view of the source. Refresh when the source changes.

2. Why use Value Field Settings for number formatting?

Formatting applied there survives layout and refresh changes more reliably than ordinary cell formatting.

3. What happens when you double-click a PivotTable value?

Excel creates a new sheet containing the source records behind that value.

4. Why might a slicer not connect to another PivotTable?

The PivotTables may use different sources or PivotCaches, making them incompatible for one shared control.

Completion checklist

  • Records: 120
  • Total Revenue: RM146,236
  • Total Profit: RM56,646
  • Regions: Central, East, North and South
  • Channels: Corporate, Online and Retail
  • Grouped periods: 12 months / 4 quarters
  • Interactive controls: Channel slicer and Date timeline

Next lesson: turn these PivotTable views into interactive PivotCharts and a compact dashboard.

Lesson 08 · Pivoting Data · Excel Advanced

Excel Advanced - Advanced Excel Tasks

Lesson 07: Advanced Excel Tasks
0 of 10 activities completed
Microsoft Excel Advanced · Lesson 07

Advanced Excel Tasks

Combine arrays, lookups, logical tests, workbook links, consolidation and navigation tools to solve multi-step spreadsheet tasks reliably.

165-minute lessonMixed Excel versions10 guided activitiesRM6,366 control total

Learning outcomes

Calculate with arraysEvaluate several row-level multiplications in one formula.
Retrieve related dataUse VLOOKUP, HLOOKUP, XLOOKUP and INDEX/MATCH safely.
Apply business logicCombine IF, AND, OR and IFERROR for dependable classifications.
Connect workbooksLink, consolidate, navigate and collaborate without losing control.

Download the practice workbook

The embedded data includes five transactions, product and employee lookup tables, a horizontal quarterly-rate table and four regional sheets with identical layouts.

5transactions
RM6,366revenue total
4regional sheets
RM175,400consolidated sales
Recommended workflow: download the workbook, save a working copy and preserve the Products and Employees sheets as lookup sources. Formula examples use commas; replace them with semicolons if required by your regional settings.

1. Array calculations

ACTIVITY 1

Calculate total Revenue in one formula

On Transactions, Quantity is in D2:D6 and the retrieved Unit Price will be in G2:G6.

=SUM(D2:D6*G2:G6)
  1. Microsoft 365: confirm with Enter.
  2. Older Excel: confirm with Ctrl+Shift+Enter; Excel may display braces around the formula.
  3. Do not type the braces manually.

Expected total: RM6,366.00.

ACTIVITY 2

Use the compatible SUMPRODUCT alternative

=SUMPRODUCT(D2:D6,G2:G6)

SUMPRODUCT handles corresponding arrays without Ctrl+Shift+Enter and is often the safest mixed-version option.

2. Exact-match vertical lookups

ACTIVITY 3

Retrieve Unit Price with VLOOKUP

In G2, search the Product ID from B2 in the Products table and return its fourth column.

=IFERROR(VLOOKUP(B2,Products!$A$2:$E$6,4,FALSE),"Not found")
  1. Lock the lookup table with absolute references.
  2. Use FALSE for exact matching.
  3. Fill the formula down to G6.

Retrieved prices: RM125, RM720, RM480, RM820 and RM838.

ACTIVITY 4

Retrieve employee Rating

=IFERROR(VLOOKUP(C2,Employees!$A$2:$E$6,4,FALSE),0)

The lookup returns the fourth column—Rating—from the Employees table. IFERROR prevents a missing ID from breaking downstream logic, but investigate unexpected zeros.

3. Modern and flexible lookups

ACTIVITY 5

Return Product Name with INDEX/MATCH

=IFERROR(INDEX(Products!$B$2:$B$6,MATCH(B2,Products!$A$2:$A$6,0)),"Not found")

MATCH finds the row position; INDEX returns the value from the Product Name column. The return column can sit left or right of the lookup column.

Microsoft 365 XLOOKUP equivalent
=XLOOKUP(B2,Products!$A$2:$A$6,Products!$B$2:$B$6,"Not found")

XLOOKUP uses separate lookup and return arrays and defaults to exact matching.

ACTIVITY 6

Use HLOOKUP for a horizontal table

On Bonus Matrix, quarter names run across the first row and bonus rates across the second.

=HLOOKUP("Q3",'Bonus Matrix'!$A$1:$E$2,2,FALSE)

Expected Q3 rate: 4%. HLOOKUP searches across the top row; VLOOKUP searches down the first column.

4. Nested logical classification

ACTIVITY 7

Classify each transaction

After calculating Revenue in H and retrieving Rating in I, enter:

=IF(AND(H2>=1000,I2>=4),"Priority",IF(OR(H2>=750,I2>=4.5),"Review","Standard"))

Excel tests Priority first. Only records that fail the first test proceed to Review, then Standard.

ResultRule
PriorityRevenue ≥ RM1,000 AND Rating ≥ 4
ReviewRevenue ≥ RM750 OR Rating ≥ 4.5
StandardNeither rule is satisfied

5. Links and three-dimensional references

ACTIVITY 8

Link cells across sheets and workbooks

  • Same workbook: ='Central'!B5
  • Another workbook: ='[Quarterly Sales.xlsx]Summary'!$B$5
  • Adjacent sheets with the same layout: =SUM(Central:Eastern!B5)

Create a separate quarterly workbook, save it, then link its total into the working file. Close and reopen both files to inspect the external-link behaviour.

Control risk: external links depend on the source location. Use Data → Queries & Connections or Edit Links, where available, to inspect, update or change sources. Never break a link until you have preserved the required values.

6. Consolidate regional sheets

ACTIVITY 9

Consolidate by position or category

  1. Confirm Central, Northern, Southern and Eastern use identical Month, Sales and Profit layouts.
  2. Create a sheet named Consolidated.
  3. Choose Data → Consolidate and select Sum.
  4. Add each regional range.
  5. For identical positions, leave labels unticked; for category consolidation, use Top row and Left column labels.
  6. Optionally create links to source data.

Expected totals: Sales RM175,400 and Profit RM52,400.

Scalable Microsoft 365 alternative

Power Query Append is usually more maintainable when files or periods grow. Import each table, append the queries and load the combined result.

7. Hyperlinks and collaboration

ACTIVITY 10

Create navigation and choose a sharing method

  1. On Start Here, insert a link to cell A1 on Transactions.
  2. Add links to Products, Employees and Consolidated.
  3. Add a web link to https://support.microsoft.com/excel.
  4. Edit display text so each link describes its destination.
  5. Compare legacy Shared Workbook/Track Changes with modern OneDrive or SharePoint co-authoring, Show Changes and Version History.
Version note: legacy sharing is hidden or deprecated in newer Excel. Do not enable it on the master exercise file. Prefer modern co-authoring where available.

Troubleshooting

#N/A lookup
Check the key, spaces, data type, locked range and FALSE exact-match argument.
#NAME? from XLOOKUP
Use VLOOKUP or INDEX/MATCH in an older Excel version.
Array result differs
Legacy Excel may require Ctrl+Shift+Enter; use SUMPRODUCT for broad compatibility.
Consolidation misses data
Confirm source ranges, labels and layouts before consolidating.

Knowledge check

1. Why use FALSE in VLOOKUP?

FALSE requires an exact key match. Approximate matching can return the wrong record when the first column is not properly sorted.

2. Why can INDEX/MATCH be more flexible?

The lookup and return ranges are independent, so the return column need not be to the right of the key.

3. What does IFERROR solve—and what can it hide?

It replaces errors with a controlled result, but may conceal bad keys or damaged ranges if used without checking the cause.

4. When is consolidation by position appropriate?

When every source sheet has the same layout and corresponding values occupy the same cells.

Completion checklist

  • Five Revenue values: RM750 / RM2,160 / RM960 / RM820 / RM1,676
  • Total Revenue: RM6,366
  • Q3 bonus rate: 4%
  • Consolidated Sales: RM175,400
  • Consolidated Profit: RM52,400
  • Navigation links: Transactions, Products, Employees and Consolidated

Next lesson: rearrange the same dataset into analytical views using PivotTables, slicers and timelines.

Lesson 07 · Advanced Excel Tasks · Excel Advanced