LibreOffice Calc
Summarize the total revenue for each promotion type in a new sheet (Sheet2) with the promotion names as the column headers using the Pivot Table feature.
Aufgabe und Verlauf liegen im englischen Original vor.
- Ergebnis
- Gelöst
- Punkte
- 1 / 1
- Schritte
- 14
- Dauer
- 9 min 1 s
Bewertungskriterien
- Checks that the spreadsheet matches the expected one on the values and properties the task names.
Abschließende Antwort
Done! I created a Pivot Table on a new sheet named 'Sheet2' in EntireSummerSales.xlsx. The pivot table has the Promotion field in Column Fields (so each promotion name appears as a column header) and Sum of Revenue in Data Fields. The sheet shows each promotion type (Fall Kite Event, Festival of Flight, None) with its total revenue underneath.
Verlauf
Schritt 10:01
Before planning I need to confirm the exact column headers, especially which column is 'promotion type' and which is 'revenue'. I'll read the header row from the saved file precisely rather than guessing from the truncated screen. Let me find the file and read row 1.
- Shell-Befehl
pip install --user openpyxl -q 2>/dev/null; python3 -c "import openpyxl,glob; f=[x for x in glob.glob('/home/user/**/EntireSummerSales.xlsx',recursive=True)][0]; print(f); wb=openpyxl.load_workbook(f, read_only=True); ws=wb.active; print('dims', ws.max_row, ws.max_column); [print(c.value) for c in next(ws.iter_rows(min_row=1,max_row=1))]"fehlgeschlagen
- Shell-Befehl
Schritt 21:24
I need to build a Pivot Table summarizing total revenue per promotion type, with promotion names as column headers, into Sheet2. First I must confirm the exact column names (Promotion and Revenue) and the data range by reading the file. Let me draft a plan and commit it to unlock the execution tools.
- Plan erstellt
- Inspect EntireSummerSales.xlsx to identify the Promotion column, the Revenue column, and the full data range (header row + last data row).
- Create a Pivot Table with Promotion in Column Fields and Sum of Revenue in Data Fields, with destination set to a new sheet named Sheet2.
- Save the workbook in its original xlsx format.
- Plan bestätigt3 Teilziele
- Plan erstellt
Schritt 31:55
I need to inspect the file to find the Promotion column, Revenue column, and data range. I'll use openpyxl to read the header row and find the last data row. Let me install openpyxl and run a script.
- Shell-Befehl
pip install --user openpyxl -q 2>/dev/null; python3 -c "import openpyxl,glob; f=[x for x in glob.glob('/home/user/**/EntireSummerSales.xlsx',recursive=True)][0]; print('FILE:',f); wb=openpyxl.load_workbook(f, read_only=True); ws=wb.active; print('dims', ws.max_row, ws.max_column); [print(i, c.value) for i,c in enumerate(next(ws.iter_rows(min_row=1,max_row=1)), start=1)]"
- Shell-Befehl
Schritt 42:20
I now have all the info needed for sg-1. Promotion = column D, Revenue = column G, data rows 2-2001. I'll mark sg-1 done and start sg-2: creating the pivot table. First, navigate to A1, then open Insert > Pivot Table.
- Teilziel erreichtFile has 2001 rows x 7 cols. Promotion=col D, Revenue=col G. Data range: A1:G2001.
- In BearbeitungCreate a Pivot Table with Promotion in Column Fields and Sum of Revenue in Data Fields, with destination set to a new sheet named Sheet2.
- Tastenkombination
ctrl+Home - Klickthe Insert menu in the menu bar
Schritt 53:27
I need to click on 'Pivot Table...' to open the pivot table creation dialog.
- Klickthe 'Pivot Table...' option in the Insert menu
Schritt 63:45
Click OK to proceed to the Pivot Table Layout dialog where I can configure Column Fields (Promotion) and Data Fields (Sum of Revenue).
- Klickthe OK button in the Select Source dialog
Schritt 74:04
I need to drag 'Promotion' to Column Fields and 'Revenue' to Data Fields. I'll drag Promotion first from the Available Fields list to the Column Fields area.
- Ziehen und Ablegenthe 'Promotion' field in the Available Fields list on the right side of the Pivot Table Layout dialog → the Column Fields area in the middle of the Pivot Table Layout dialog
Schritt 84:29
Now I need to drag 'Revenue' from Available Fields to the Data Fields area. This will make the pivot table sum the revenue values.
- Ziehen und Ablegenthe 'Revenue' field in the Available Fields list on the right side of the Pivot Table Layout dialog → the Data Fields area in the lower-middle of the Pivot Table Layout dialog
Schritt 94:43
Now I need to set the destination to a new sheet named 'Sheet2'. I'll click on 'Source and Destination' to expand that section and configure the destination.
- Klickthe 'Source and Destination' expandable section in the Pivot Table Layout dialog
Schritt 105:06
I need to create the pivot table on a new sheet named 'Sheet2'. The dialog doesn't show a text field to name the new sheet directly, so I'll click OK to create it on a new sheet, then rename the sheet to 'Sheet2'.
- Klickthe OK button in the Pivot Table Layout dialog
Schritt 115:36
I need to rename the sheet tab 'Pivot Table_Sheet1_1' to 'Sheet2'. I'll double-click the sheet tab to open the rename dialog.
- Doppelklickthe sheet tab labeled 'Pivot Table_Sheet1_1' at the bottom of the screen
Schritt 126:02
I need to clear the field and type 'Sheet2', then click OK to rename the sheet.
- Eingabe
Sheet2 - Klickthe OK button in the Rename Sheet dialog
- Eingabe
Schritt 136:32
Subgoal sg-2 is complete. Now I need to save the file in xlsx format (sg-3). I'll use Ctrl+S and keep the xlsx format when prompted.
- Teilziel erreichtPivot table created on Sheet2 with Promotion in Column Fields and Sum of Revenue in Data Fields. Promotion names appear as column headers with revenue totals.
- In BearbeitungSave the workbook in its original xlsx format.
- Tastenkombination
ctrl+s
Schritt 146:52
The pivot table is on Sheet2 with promotion names as column headers and revenue totals. The file has been saved. All subgoals are complete. I should mark sg-3 as done and finish.
- Teilziel erreichtFile saved in xlsx format. Sheet2 contains the pivot table with promotion names as column headers and sum of revenue values.
- Als abgeschlossen gemeldet