[Solved] Create pivot table with multiple columns

Discuss the spreadsheet application
Locked
SteveBros
Posts: 19
Joined: Sun Apr 19, 2015 1:31 am

[Solved] Create pivot table with multiple columns

Post by SteveBros »

Here's a pivot table below. How do I get the "cost" and "usage" values to each have its own column instead of being stacked so that there is only one row per "period"? (they have separate columns in the detail data)

Filter

period Data
2023-01 Sum - cost 201.8
Sum - USAGE (kWh) 608.4
2023-02 Sum - cost 190.59
Sum - USAGE (kWh) 556.33
2023-03 Sum - cost 226.87
Sum - USAGE (kWh) 606.88
2023-04 Sum - cost 200.45
Sum - USAGE (kWh) 537.29
2023-05 Sum - cost 207.23
Sum - USAGE (kWh) 555.42
2023-06 Sum - cost 202.57
Sum - USAGE (kWh) 550.4
2023-07 Sum - cost 250.98
Sum - USAGE (kWh) 644.79
2023-08 Sum - cost 226.12
Sum - USAGE (kWh) 578.99
Last edited by MrProgrammer on Sat Dec 13, 2025 4:17 pm, edited 1 time in total.
Reason: Tagged ✓ [Solved]
Apache OpenOffice 4.1.7 (Build 9800)
macOS Mojave 10.14.6, Retina 5K, Radeon Pro 580
User avatar
robleyd
Moderator
Posts: 5504
Joined: Mon Aug 19, 2013 3:47 am
Location: Murbko, Australia

Re: How to get a pivot table with multiple columns

Post by robleyd »

Without information on how your data is structured it is hard to give a solution. Perhaps you could provide a sample spreadsheet showing how your data is structured, and include your current pivot table.
Slackware 15 (current) 64 bit
Apache OpenOffice 4.1.16
LibreOffice 26.2.3.2; SlackBuild for 26.2.3 by Eric Hameleers
---------------
I hate this damn computer, I wish that I could sell it.
It won't do what I want it to, Only what I tell it.
User avatar
MrProgrammer
Moderator
Posts: 5430
Joined: Fri Jun 04, 2010 7:57 pm
Location: Wisconsin, USA

Re: How to get a pivot table with multiple columns

Post by MrProgrammer »

SteveBros wrote: Sun Dec 07, 2025 2:36 am How do I get the "cost" and "usage" values to each have its own column instead of being stacked?
Drag the Data button to the right, as explained in these topics.
[Solved] Combine data values by date
[Solved] Count & Sum The Value

If you need any additional assistance attach a spreadsheet demonstrating the situation (remove confidential information then use Post Reply, not Quick Reply, and don't attach a picture instead of the spreadsheet itself). I will not help further unless you attach a spreadsheet document.

If this solved your problem please go to your first post use the Edit ✏️ button and add [Solved] to the start of the Subject field. Select the green checkmark icon at the same time.
Mr. Programmer
AOO 4.1.7 Build 9800, MacOS 13.7.8, iMac Intel.   The locale for any menus or Calc formulas in my posts is English (USA).
Locked