Turn categories into columns for a report. Stack those columns into rows for analysis.
Open your workflow
Download the starter ZIP and extract the entire folder.
Open Transform_Practice.yxmd. Keep the data folder beside it.
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.
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
Rep
Item
Qty
Bob
Hat
1
Bob
Hat
2
2. Cross Tab (Sum)
Rep
Hat
Bob
3
3. Transpose
Rep
Name
Value
Bob
Hat
3
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.
OrderID
OrderDate
Store
Region
Channel
ProductCategory
Units
UnitPrice
PromoFlag
1001
2026-02-03
Store A
West
Online
Beverages
4
3.5
Y
1002
2026-02-03
Store A
West
In-Store
Beverages
2
3.5
N
1003
2026-02-03
Store A
West
Online
Snacks
3
2.0
Y
1004
2026-02-04
Store A
West
In-Store
Snacks
5
2.0
N
1005
2026-02-04
Store B
West
Online
Beverages
6
3.5
N
1006
2026-02-04
Store B
West
In-Store
Beverages
1
3.5
Y
1007
2026-02-05
Store B
West
Online
Snacks
2
2.0
N
1008
2026-02-05
Store B
West
In-Store
Snacks
4
2.0
Y
1009
2026-02-06
Store C
East
Online
Beverages
3
3.75
N
1010
2026-02-06
Store C
East
In-Store
Beverages
2
3.75
Y
1011
2026-02-06
Store C
East
Online
Snacks
6
2.25
Y
Desired report
4 rows × 3 columns. One row per region and product category, with total units sold.
View desired output
Region
ProductCategory
TotalUnits
East
Beverages
5
East
Snacks
6
West
Beverages
13
West
Snacks
14
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.
Setting
Choose
Group data by
Region
New column headers
ProductCategory
Values / aggregation
Units / Sum
Cross Tab configurationDesigner screenshot
Image placeholder
Transpose
Stack the category totals
Connect Transpose to Cross Tab. Run and inspect Name and Value.
Setting
Choose
Key columns
Region
Data columns
Beverages, Snacks
Transpose configurationDesigner screenshot
Image placeholder
Select
Name the output fields
Connect a new Select tool. Rename the two fields and click Run.
Setting
Choose
Name
ProductCategory
Value
TotalUnits
Select configurationDesigner screenshot
Image placeholder
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.
StudentID
StudentName
Major
Club
ActivityType
HoursSpent
EventDate
101
Alice Kim
Finance
Hiking Club
Meeting
2
2026-02-01
102
David Chen
Marketing
Hiking Club
Event
5
2026-02-02
103
Sarah Lopez
Accounting
Chess Club
Meeting
2
2026-02-02
104
James Patel
Finance
Chess Club
Tournament
4
2026-02-03
105
Emma Garcia
Economics
Robotics Club
Workshop
3
2026-02-03
106
Michael Brown
Accounting
Robotics Club
Meeting
2
2026-02-04
107
Sophia Lee
Finance
Hiking Club
Event
6
2026-02-05
108
Daniel Park
Marketing
Chess Club
Meeting
2
2026-02-05
109
Olivia Nguyen
Economics
Robotics Club
Workshop
4
2026-02-06
110
Ethan Walker
Finance
Hiking Club
Meeting
2
2026-02-06
111
Lucas Smith
Accounting
Chess Club
Tournament
5
2026-02-07
112
Mia Johnson
Marketing
Robotics Club
Workshop
3
2026-02-07
113
Noah Davis
Economics
Hiking Club
Event
4
2026-02-08
114
Ava Martinez
Finance
Chess Club
Meeting
2
2026-02-08
115
Liam Wilson
Accounting
Robotics Club
Meeting
2
2026-02-09
116
Isabella Clark
Marketing
Hiking Club
Event
5
2026-02-09
Desired report
12 rows × 3 columns. One row per club and activity type, including combinations with zero hours.
View desired output
Club
ActivityType
TotalHours
Chess Club
Event
0
Chess Club
Meeting
6
Chess Club
Tournament
9
Chess Club
Workshop
0
Hiking Club
Event
20
Hiking Club
Meeting
4
Hiking Club
Tournament
0
Hiking Club
Workshop
0
Robotics Club
Event
0
Robotics Club
Meeting
4
Robotics Club
Tournament
0
Robotics Club
Workshop
10
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.
Setting
Choose
Group data by
Club
New column headers
ActivityType
Values / aggregation
HoursSpent / Sum
Cross Tab configurationDesigner screenshot
Image placeholder
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.
Setting
Choose
Fields
Event, Meeting, Tournament, Workshop
Replace nulls
Replace numeric nulls with 0
Data Cleansing configurationDesigner screenshot
Image placeholder
Transpose
Create one row per club and activity
Connect Transpose. Keep the club name alongside every activity.
Setting
Choose
Key columns
Club
Data columns
Event, Meeting, Tournament, Workshop
Transpose configurationDesigner screenshot
Image placeholder
Select
Label the hours
Connect Select, rename the fields, and click Run.
Setting
Choose
Name
ActivityType
Value
TotalHours
Select configurationDesigner screenshot
Image placeholder
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.
StoreID
Department
Jan
Feb
Mar
S01
Apparel
120
140
160
S01
Gifts
80
60
90
S02
Apparel
180
200
210
S02
Gifts
120
110
130
S03
Apparel
100
115
130
S03
Gifts
60
75
80
S04
Apparel
190
205
220
S04
Gifts
90
95
100
Store directory
4 rows × 2 columns. One row per store.
StoreID
Region
S01
East
S02
East
S03
West
S04
West
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
Region
Jan
Feb
Mar
East
250.00
255.00
295.00
West
220.00
245.00
265.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 pending
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 pending
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 pending
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