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
2 answers

SQL Server Pivot for counting instances in join table

I have 3 tables; category, location and business. The category and location tables simply have an id, and a name. Each business record has a categoryID, and a locationID, and a name field. I'd like to construct a table that shows as a matrix, the…
Grenville
  • 235
  • 2
  • 13
2
votes
1 answer

Editing an Excel Pivot table using perl

I have an excel 2010 file (xlsx) with a sheet of data and a sheet with pivot table using that data. I would like to write a perl code that can change the data, and then the pivot table would be changed automaticly according to the new data. I'm…
2
votes
1 answer

Laravel 4.1 whereHas [ Integrity constraint violation: 1052 Column 'confirm' in where clause is ambiguous ]

I'm having trouble using whereHas, here is the code: where('confirm',1); })->get(); // $courses = Course::has('teams')->get(); ?> Error: SQLSTATE[23000]:…
Xolmer
  • 375
  • 1
  • 4
  • 6
2
votes
1 answer

Filter By Last 14 Days Pivot Table Excel 2010

I have a table on a worksheet that contains a Date column. I have created a Pivot Table/Chart on a new worksheet. I want to be able to filter the data in the chart being displayed by the last 14 days (Always relative to the current date). I have the…
John
  • 147
  • 3
  • 11
2
votes
1 answer

how to create dynamic pivot tables in MySQL

I'm having trouble generating pivot tables in MySQL and wonder if anyone can give me any tips and some documentation so I can finally resolve this problem. My problem is as follows: I have 2 tables in my database. clients contains customer…
2
votes
1 answer

How to troubleshoot drillthrough error in Excel 2007 -> SSAS 2008

I've created a cube in SSAS 2008, and have it deployed to my local server. I can connect to the cube via Excel 2007, and the pivot table and pivot chart work perfectly. When I try to drillthrough on a cell to see the detail rows, I get the following…
Meff
  • 5,889
  • 27
  • 36
2
votes
1 answer

Excel pivot table: How to transpose multiple value in column to a column labels

Here's the pivot table I have in excel: I have a list of website with their emails address. Sometime you have one email per website, sometime you have 3 emails per website. I want to transpose the multiple emails I have for one website that are in…
user3353255
  • 35
  • 2
  • 4
2
votes
1 answer

Pivot table on two SQL table, one with 5m+ rows?

Table cities has 2k rows INT id VARCHAR name Table persons has 5M rows VARCHAR person_id INT city_id` (Foreign Key to table cities.id) Note this is a one-to-many relationship. I would like to get the following table: VARCHAR city_name INT…
Popcorn
  • 5,188
  • 12
  • 54
  • 87
2
votes
2 answers

Preventing Excel PivotTable Page Items overwriting Cells above

I have an Excel Workbook with a Sheet that contains some company template headers with a Pivot Table placed underneath. This document is to be used as a template for pivot reports and the headers have to remain intact above the Pivot Table however…
AeroX
  • 3,387
  • 2
  • 25
  • 39
2
votes
2 answers

Can't sort Excel PivotTable Row Label as Numbers

Using PowerPivot and creating a PivotTable in Excel 2010, trying to sort a Row Label column that contains numerical values as numbers instead of as text. No matter what I've tried, though, Excel refuses to play along. For example, I created a very…
Justin S
  • 323
  • 1
  • 2
  • 10
2
votes
2 answers

advice for SQL query with row values as columns

What is the best way to go about returning a result set with the distinct zone values as columns from the below basic select query? SELECT weight, base_rate, zone FROM Rates WHERE modeId = 984 Here is the table: Rates table: id int …
flerngobot
  • 616
  • 1
  • 9
  • 30
2
votes
4 answers

How do I get distinct COUNT in pivot?

I have a following table: State LAB GROUP DATE CODE ID UP A I 1-Jan 1 345 UP R S 1-Feb 1 456 UP A S 1-Jan 2 567 DL R S 1-Feb 3 678 DL T S 1-Jan 1 789 DL A S 1-Jan 2 900 MN T S …
user3218428
  • 21
  • 1
  • 1
  • 4
2
votes
3 answers

Excel - previous sheet name when defining sourcedata for chart

I am trying to write a macro to create a pivot table in a new sheet. I'm having problems eliminating the dependence on sheet names, as the names of my data changed daily, but the format does not. My macro errors here with "Run-time error 438:…
skkevinperson
  • 57
  • 1
  • 8
2
votes
1 answer

EPPlus create chart from pivot

I'm using EPPlus in .Net and have created a pivot table with a row field and one summary data field. Does anyone know how to create charts from a pivot table? And I don't know pivot table's range. Here is my code: static void DT2XL(DataTable dt,…
Gantul9a
  • 31
  • 1
  • 4
2
votes
2 answers

Pivot table in LINQ TO SQL

I am unable to use Pivot in SQL server due to some compatible issues, so I am trying do same thing in code level by using LINQ TO SQL. I have a record set as like below. Dates RM DM LocationNum City State Count -----…
Jagadeesh
  • 1,630
  • 8
  • 24
  • 35