HomeACCT 311 · Module 8.4Alteryx Designer
Lesson
Start here
Core concepts
Wide and long formats Try the tools
Guided practice
Retail OrdersCampus Clubs
Independent practice
Monthly sales challenge

Instructor folder

Extract the ZIP and open Transform_Completed.yxmd. It contains the completed Retail Orders, Campus Clubs, and Monthly Sales workflows on one canvas.

Download instructor folder
ACCT 311 / Alteryx 8.4

Transpose and Cross Tab

Turn categories into columns for a report. Stack those columns into rows for analysis.

Open your workflow

  1. Download the starter ZIP and extract the entire folder.
  2. Open Transform_Practice.yxmd. Keep the data folder beside it.
  3. Click Run. Click the right output anchor of an Input Data tool to inspect its source table. Build to the right from the labeled Select tool. When finished, expand the case’s Desired output container on the far right. Click the Text Input tool’s output anchor to compare the suggested result with yours.
↓ Download starter ZIP

Lesson sequence

ExploreWide and long formats ↗Practice 1Retail Orders ↗Practice 2Campus Clubs ↗ChallengeMonthly sales ↗
Core concepts

Read the shape of a table

Follow Alice’s scores across the two tables. In the long table, Subject identifies what each score measures.

Wide format
Person
Math
Science
Alice
90
85
Long format
Person
Subject
Score
Alice
Math
90
Alice
Science
85

Think Which field stays with both scores when the subjects move into rows?

Cross Tab

Choose the field that defines each row, the field whose values become headers, and the measure to aggregate.

Transpose

Keep the identifying fields. Each selected data column contributes a Name and a Value to a new row.

Core concepts / Interactive builder

Try the tools

Use the dining hall data to build a wide report, then stack the category totals back into rows.

Starting table

Each row is one record. This is the long-format data students start with.

Desired table after Cross Tab

Cross Tab configuration

Goal: turn MenuCategory values into columns and sum ItemsSold by DiningHall.

Available fields

Your Cross Tab output · Starting table for Transpose

Desired table after Transpose

Transpose configuration

Goal: take the wide data above and "unpivot" it. Keep the identifier and stack the new category columns back down into rows.

Available fields (From Cross Tab)

Run the Cross Tab above to generate fields here.

Your Transpose output

Practice with three more examples

Interactive Scenarios

Starting table
StoreItemQty
NorthHat5
SouthHat5
NorthShoe2
Desired table
HatShoe
102
1. Notice there is ONLY ONE ROW in the output. Which configuration produced this?
A) Transpose (Key: Store, Data: Item, Qty)
B) Cross Tab (Group By: NONE, Header: Item, Value: Qty, Method: Sum)
C) Cross Tab (Group By: Store, Header: Item, Value: Qty, Method: Sum)

Animation: Notice how both 'Hat' records (5+5) collapse into a single cell (10) because we didn't tell Alteryx to group them by Store.

Starting table
StoreItemQty
NorthHat5
NorthShoe2
SouthHat5
Desired table
StoreHatShoe
North52
South5[Null]
2. The stores are separated onto their own rows. Which configuration produced this?
A) Transpose (Key: Store, Data: Item, Qty)
B) Cross Tab (Group By: NONE, Header: Item, Value: Qty, Method: Sum)
C) Cross Tab (Group By: Store, Header: Item, Value: Qty, Method: Sum)

Animation: The 'Store' column is selected in the 'Group By' box, locking it in place to form the rows of the new table.

1. Raw Data
RepItemQty
BobHat1
BobHat2
2. Cross Tab (Sum)
RepHat
Bob3
3. Transpose
RepNameValue
BobHat3
3. If you run a Cross Tab, and then immediately run a Transpose to "undo" it, does it perfectly restore the raw data?
A) Yes, Transpose is the exact undo of Cross Tab, so the data is perfectly restored.
B) No, because the aggregation step in Cross Tab permanently combined the two records. Transpose only unpivots the aggregated result.

Animation: The individual records (1 and 2) are smashed together into a 3 during Cross Tab. Transpose just pushes that 3 back down into a row. The original detail is gone!

Guided practice / 01

Retail Orders

Report units sold by region and product category. Begin at the Retail Orders Select tool.

Starting file

orders_demo.csv · 11 rows × 9 columns. One row per order.

OrderIDOrderDateStoreRegionChannelProductCategoryUnitsUnitPricePromoFlag
10012026-02-03Store AWestOnlineBeverages43.5Y
10022026-02-03Store AWestIn-StoreBeverages23.5N
10032026-02-03Store AWestOnlineSnacks32.0Y
10042026-02-04Store AWestIn-StoreSnacks52.0N
10052026-02-04Store BWestOnlineBeverages63.5N
10062026-02-04Store BWestIn-StoreBeverages13.5Y
10072026-02-05Store BWestOnlineSnacks22.0N
10082026-02-05Store BWestIn-StoreSnacks42.0Y
10092026-02-06Store CEastOnlineBeverages33.75N
10102026-02-06Store CEastIn-StoreBeverages23.75Y
10112026-02-06Store CEastOnlineSnacks62.25Y

Desired report

4 rows × 3 columns. One row per region and product category, with total units sold.

View desired output
RegionProductCategoryTotalUnits
EastBeverages5
EastSnacks6
WestBeverages13
WestSnacks14
Select
→
Cross Tab
→
Transpose
→
Select

Think If West has four beverage orders, how many cells should hold their combined units?

Cross Tab

Total the units

Connect Cross Tab to Select. Run and find West under Beverages.

SettingChoose
Group data byRegion
New column headersProductCategory
Values / aggregationUnits / Sum
Cross Tab configurationDesigner screenshot
Image placeholderRetail Orders Cross Tab groups by Region and sums Units under ProductCategory headers.
Transpose

Stack the category totals

Connect Transpose to Cross Tab. Run and inspect Name and Value.

SettingChoose
Key columnsRegion
Data columnsBeverages, Snacks
Transpose configurationDesigner screenshot
Image placeholderRetail Orders Transpose keeps Region and stacks Beverages and Snacks.
Select

Name the output fields

Connect a new Select tool. Rename the two fields and click Run.

SettingChoose
NameProductCategory
ValueTotalUnits
Select configurationDesigner screenshot
Image placeholderRetail Orders Select renames Name to ProductCategory and Value to TotalUnits.
Guided practice / 02

Campus Clubs

Show hours for every club and activity. The activity log is complete for this period, so an absent combination means zero hours.

Starting file

campus_club_activity.csv · 16 rows × 7 columns. One row per student activity.

StudentIDStudentNameMajorClubActivityTypeHoursSpentEventDate
101Alice KimFinanceHiking ClubMeeting22026-02-01
102David ChenMarketingHiking ClubEvent52026-02-02
103Sarah LopezAccountingChess ClubMeeting22026-02-02
104James PatelFinanceChess ClubTournament42026-02-03
105Emma GarciaEconomicsRobotics ClubWorkshop32026-02-03
106Michael BrownAccountingRobotics ClubMeeting22026-02-04
107Sophia LeeFinanceHiking ClubEvent62026-02-05
108Daniel ParkMarketingChess ClubMeeting22026-02-05
109Olivia NguyenEconomicsRobotics ClubWorkshop42026-02-06
110Ethan WalkerFinanceHiking ClubMeeting22026-02-06
111Lucas SmithAccountingChess ClubTournament52026-02-07
112Mia JohnsonMarketingRobotics ClubWorkshop32026-02-07
113Noah DavisEconomicsHiking ClubEvent42026-02-08
114Ava MartinezFinanceChess ClubMeeting22026-02-08
115Liam WilsonAccountingRobotics ClubMeeting22026-02-09
116Isabella ClarkMarketingHiking ClubEvent52026-02-09

Desired report

12 rows × 3 columns. One row per club and activity type, including combinations with zero hours.

View desired output
ClubActivityTypeTotalHours
Chess ClubEvent0
Chess ClubMeeting6
Chess ClubTournament9
Chess ClubWorkshop0
Hiking ClubEvent20
Hiking ClubMeeting4
Hiking ClubTournament0
Hiking ClubWorkshop0
Robotics ClubEvent0
Robotics ClubMeeting4
Robotics ClubTournament0
Robotics ClubWorkshop10
Select
→
Cross Tab
→
Data Cleansing
→
Transpose
→
Select
Cross Tab

Report hours by club

Start from the Campus Clubs Select tool. Run Cross Tab and look at Hiking Club under Workshop.

SettingChoose
Group data byClub
New column headersActivityType
Values / aggregationHoursSpent / Sum
Cross Tab configurationDesigner screenshot
Image placeholderCampus Clubs Cross Tab groups by Club and sums HoursSpent under ActivityType headers.

Think What should the empty workshop cell mean for Hiking Club?

Data Cleansing

Fill the missing combinations

Connect Data Cleansing. Apply the replacement to the four activity columns.

SettingChoose
FieldsEvent, Meeting, Tournament, Workshop
Replace nullsReplace numeric nulls with 0
Data Cleansing configurationDesigner screenshot
Image placeholderCampus Clubs Data Cleansing replaces numeric nulls with zero in the four activity columns.
Transpose

Create one row per club and activity

Connect Transpose. Keep the club name alongside every activity.

SettingChoose
Key columnsClub
Data columnsEvent, Meeting, Tournament, Workshop
Transpose configurationDesigner screenshot
Image placeholderCampus Clubs Transpose keeps Club and stacks Event, Meeting, Tournament, and Workshop.
Select

Label the hours

Connect Select, rename the fields, and click Run.

SettingChoose
NameActivityType
ValueTotalHours
Select configurationDesigner screenshot
Image placeholderCampus Clubs Select keeps Club, renames Name to ActivityType, and renames Value to TotalHours.
Independent challenge

Monthly sales per store

The controller wants average monthly sales per store for each region. Give each store equal weight.

Starting files

Department sales

8 rows × 5 columns. One row per store and department.

StoreIDDepartmentJanFebMar
S01Apparel120140160
S01Gifts806090
S02Apparel180200210
S02Gifts120110130
S03Apparel100115130
S03Gifts607580
S04Apparel190205220
S04Gifts9095100

Store directory

4 rows × 2 columns. One row per store.

StoreIDRegion
S01East
S02East
S03West
S04West

Desired report

2 rows × 4 columns. One row per region. The Jan, Feb, and Mar columns show average sales per store in dollars.

View desired output
RegionJanFebMar
East250.00255.00295.00
West220.00245.00265.00

Build the workflow

Start at the two Challenge Select tools. Use Transpose, Cross Tab, Join, and Summarize once each. Choose the field settings as you go.

1. Stack the months (Transpose)

Start at the Department sales Select tool. Use Transpose to turn the three month columns into rows.

  • Under Key Columns, select StoreID and Department. Under Data Columns, select Jan, Feb, and Mar.
  • In the output, Name holds the month and Value holds the sales amount.
  • Check S01 Apparel. You should see three rows: Jan 120, Feb 140, and Mar 160.
Hint and screenshot

Follow S01 Apparel. Its January, February, and March amounts should now appear on three rows.

Stack the monthsDesigner screenshot
Screenshot pendingMonthly sales step 1: Stack the months

2. Build monthly totals per store (Cross Tab)

Use Cross Tab to make Jan, Feb, and Mar the column headers. Each store should have one row showing its total sales for each month.

  • Group by StoreID.
  • Choose Name (month) for the column headers and Value (sales) for the new column values.
  • Choose Sum. For S01 in January, Apparel sold $120 and Gifts sold $80, so the Jan cell should show $200.
Hint and screenshot

S01 has two January amounts, 120 and 80. Which aggregation puts both into one cell?

Build monthly totals for each storeDesigner screenshot
Screenshot pendingMonthly sales step 2: Build monthly totals for each store

3. Attach the region (Join)

Use Join to add the region to each store’s monthly totals.

  • Connect the Cross Tab output to the left input and the Store directory Select tool to the right input.
  • Match StoreID on both sides. Each ID identifies one store. Several stores share the same region.
  • Connect the J (joined) output to the next tool. It should contain four matched stores.
Hint and screenshot

Two stores can share a region. Which field identifies exactly one store in both inputs?

Attach the regionDesigner screenshot
Screenshot pendingMonthly sales step 3: Attach the region

4. Calculate regional averages (Summarize), then run

Use Summarize to create one row per region with average store sales for each month.

  • Group by Region. Apply Average separately to Jan, Feb, and Mar. Set the three output names to Jan, Feb, and Mar.
  • Each incoming row represents one store. East has two stores, so its January average is ($200 + $300) ÷ 2 = $250.
  • Click Run and inspect the Summarize output anchor. Compare the East and West rows with the desired report above.
Hint and screenshot

At this point, each incoming row represents a whole store. How many stores should contribute to the East average?

Calculate the regional averagesDesigner screenshot
Screenshot pendingMonthly sales step 4: Calculate the regional averages
Screenshot
100%