Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

pivot table with text values

Posted on 2015-01-20
8
Medium Priority
?
145 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 34

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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

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
 
LVL 34

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 2000 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

[Webinar] Cloud Security

In this webinar you will learn:

-Why existing firewall and DMZ architectures are not suited for securing cloud applications
-How to make your enterprise “Cloud Ready”, and fix your aging DMZ architecture
-How to transform your enterprise and become a Cloud Enabler

Question has a verified solution.

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

This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
This article describes how you can use Custom Document Properties to store settings and other information in your workbook so that they will be available the next time you open the workbook.
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…

963 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