Solved

pivot table with text values

Posted on 2015-01-20
8
105 Views
Last Modified: 2015-01-22
I need to create a pivot table to summarize data, some of which is text.
The text values return as zeroes - is there a way to display them as text?
There is only one value for the row/column combination
0
Comment
Question by:szy8xj
8 Comments
 
LVL 18

Expert Comment

by:Simon
ID: 40560606
Only if you put the text fields as row or column items, not into the data area.
0
 

Author Comment

by:szy8xj
ID: 40560610
Boo! Thanks anyway!
0
 
LVL 32

Expert Comment

by:Rob Henson
ID: 40562063
You can replicate the Pivot Table function with Dbase formulas if you need to extract one set of data for a particular set of criteria, ie one result at a time rather than a table of results like a pivot.

All of the Dbase formulae have the following syntax:  =Dbase(Datatable,Field,Criteria)

DataTable - The datasource, same as you would use for the pivot
Field - The column header of the column from which you want the result
Criteria - A subset datatable with some or all of the same headers as source data and criteria specified under each.

The criteria table takes a bit of getting used to but is quite useful once you understand it.

Examples of DBASE functions are:
DSUM - add up a certain column (Field) based on criteria (similar to SUMPRODUCT or SUMIFS)
DMIN - return the minimum value from the specified column (Field) based on criteria
DMAX - return the maximum value from the specified column (Field) based on criteria
DGET - retrieve a single value from specified column (Field) that matches criteria, this can include text values.

Hope that helps.

Thanks,
Rob H
0
 

Author Comment

by:szy8xj
ID: 40562148
So Bob, here is what I have in a nutshell....

Excel file -

Record looks like this: SSN, DATA ELEMENT NAME, VALUE
Number of SSN's is variable, number of DATA ELEMENTS per SSN is variable and not all SSN have the same DATA ELEMENTS, and VALUES depend on DATA ELEMENT NAME and are text and numeric.

I need to change this to one row per SSN with data element names as column headings and values under those headings in order to copy it into a template file - MS Access form.

I thought a pivot table with SSN as row identifier, Data Element name as Column heading and value. The numerics work great using MAX as the field setting but the text values come back as zero.

Will the DBASE technique get me that?

Thanks!
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 32

Expert Comment

by:Rob Henson
ID: 40562227
Can you upload a sample?

Thanks
Rob
0
 

Author Comment

by:szy8xj
ID: 40562515
Here is a sample file - the actual file has several thousand rows and up to 25 data elements - Thanks!
TESTFILE.xlsx
0
 
LVL 16

Accepted Solution

by:
Jerry Paladino earned 500 total points
ID: 40563970
If you Load or Link your Excel data as a table in Microsoft Access called "Tbl_Temp", the following SQL Query will transform your data into the format you are requesting...
TRANSFORM Max(Tbl_Temp.VALUE) AS MaxOfVALUE
SELECT Tbl_Temp.SSN
FROM Tbl_Temp
GROUP BY Tbl_Temp.SSN
PIVOT Tbl_Temp.[DATA ELEMENT];

Open in new window

Query Output
0
 

Author Closing Comment

by:szy8xj
ID: 40564062
Many thanks! This will be a big timesaver!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Approximate matching with VLOOKUP and MATCH seems to me to be a greatly under-used technique, and one which is vital for getting good performance out of large lookups. Until recently I would always have advised using an exact match for simplicity an…
How to quickly and accurately populate Word documents with Excel data, charts and images (including Automated Bookmark generation) David Miller (dlmille) Synopsis In this article you’ll learn how to use ExcelToWord! to copy data,charts, shapes …
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now