Questions tagged [pivot-table]

A "pivot table" is a method of summarizing data in tabular form. Typically, these have a category column in the left hand side, and multiple summary columns to the right. Each different category will have its own row. Be sure to include the relevant language tag (python, excel, R, postgreSQL etc.) on your question.

A "pivot table" is a method of summarizing data in tabular form. Typically, these have a category column in the left hand side, and multiple summary columns to the right. Each different category will have its own row.

Pivot tables are typically found in data visualization programs, including spreadsheets and business intelligence. Note that a "pivot table" is also known as a "cross tab" or "cross tabulation".

Resources:

8105 questions
2
votes
4 answers

SQL - Insert Using Column Name as Value

I am trying to do an insert into table2 based on a select from table1, but I can not get the correct syntax. The column names from table1 will drive the value being inserted into the PD_NO column in table2, as shown in the example below. Can…
thefreeline
  • 621
  • 1
  • 12
  • 26
2
votes
2 answers

tsql list of dates to date ranges

I am trying to generate an item, date range summary from a list of item, date(s) for sql-2008. DECLARE @RoomDays AS TABLE ( [RoomID] [int] NOT NULL, [DateOf] [date] NOT NULL, [Segment] [char](1) NOT NULL ) INSERT INTO @RoomDays VALUES…
dangle
  • 21
  • 1
2
votes
1 answer

Arranging columns in pivot_table, Pandas

I have a question regarding rearrangement of the columns in a pivot_table. I want to group columns by month, but with the arrangement as follows: JAN FEB X,Y,X/Y X,Y,X/Y .... The current output is: JAN FEB JAN FEB JAN ... X X …
ryzhiy
  • 323
  • 4
  • 12
2
votes
1 answer

Incorrectly pivoting table after JOINing?

SELECT GROUP_CONCAT(if(meta_summary = 'content', content, NULL)) AS content, GROUP_CONCAT(if(meta_summary = 'supplemental', content, NULL)) AS supplemental, GROUP_CONCAT(if(meta_summary = 'heading', content, NULL)) AS…
meder omuraliev
  • 183,342
  • 71
  • 393
  • 434
2
votes
2 answers

Invalid Procedure Call or Argument when Creating a Pivot Table

Trying to create a Pivot Table out of a set of Data. Usually it runs fine the first time, but if you try and run it a second time it throws an "Invalid Procedure Call or Argument" and when you click debug the code highlights the below as the issue.…
Ravin
  • 626
  • 2
  • 10
  • 25
2
votes
1 answer

How to extend data source for pivot table?

I'm synchronizing data with an external database and the result is delivered to me on a sheet called All Items. Setting up a pivot table is easy. However, on the horizontal axis I need to display a custom value, computed from one of the columns in…
Konrad Viltersten
  • 36,151
  • 76
  • 250
  • 438
2
votes
0 answers

Excel AddIn : Hide a datafield in a pivottable

I'm trying to control an Excel (2010) PivotTable from a VSTO (excel AddIn) in C# (4.0). I've got no problem adding PivotFields (Dimensions) and DataFields (Measures) to the PivotTable. The problem is I can't remove a DataField. My DataField is a…
krimog
  • 1,257
  • 11
  • 25
2
votes
0 answers

Date Filters and Group options do not appear

I am quite a new user, working on a pivot table with SQL Server Analysis Services on Windows Server 2003. I am unable to filter my reports by date despite having Googled many websites for advice. A blog tells me that by grouping we can easily filter…
ahsan
  • 95
  • 6
  • 13
2
votes
1 answer

TSql Complex Pivot

I have a table like this... LEVEL Action Date User -------------------------------------------------- 1 Approve 01/01/2013 User1 2 Approve 02/01/2013 User2 3 …
Usman Khalid
  • 3,032
  • 9
  • 41
  • 66
2
votes
2 answers

Current Session is no longer valid due to structural changes

We have a spreadsheet connected to a cube that is refreshed every two hours like this: Refresh data in the data warehouse Perform a "Process Full" on one of the many partitions in a duplicate of the target cube Backup the processed cube and restore…
confusedKid
  • 3,231
  • 6
  • 30
  • 49
2
votes
2 answers

PivotTable error 1004

Can anyone see why this code would cause a 1004 error on the last line? Everything works great up until that last line. I had it working, then it started getting this error and I can't figure out why. Sheet2 is a blank sheet. Sheet1 is currently…
user2021539
  • 949
  • 3
  • 14
  • 31
2
votes
1 answer

Correlation in Excel Pivot Table

I have a significant amount of data which I must analyse in Excel (this would be much easier in a DB, I realize). Each line item has a T/F indicator for it's membership in a given category and I would like to get a correlation of volume and price…
Mike PG
  • 231
  • 1
  • 4
  • 14
2
votes
2 answers

Excel Pivot Table - Averaging by Category

I'm trying to create an average by category in a pivot table. This is the first time I've created a pivot table so sorry if the answer is staring me in the face. My raw data looks like: Date, Transaction type, Description, Paid out, Paid…
Ian
  • 33,605
  • 26
  • 118
  • 198
2
votes
2 answers

Filtering a PivotTable by Boolean

The source data for my Excel PivotTable looks like the following (this is a simplification): id name score 1 john 15 2 james 2 3 pat 14 4 jake 12 ... I have a PivotTable that uses this as a data source. Now, what I want to do is have the…
Kurt Spindler
  • 1,311
  • 1
  • 14
  • 22
2
votes
1 answer

Example of how to create a Pivot Table in ClosedXML

We are using ClosedXML to generate .XLSX spreadsheets because it is small, nimble, and quick. It appears that all the pivot table classes and methods are there in the API, but there is no documentation or examples on how to go about (in the correct…
Jay Imerman
  • 4,475
  • 6
  • 40
  • 55