Pivot table - Same column Name

  • Thread starter Thread starter Portuga
  • Start date Start date
P

Portuga

Hi,

I get a report produced by another application in an excel spreadsheet
and
I am trying to do a pivot table from this report.

In this spreadsheet I have the (partial) following columns with the
headings:

Column a; Column b; Column c; Column d; Column e;
Acc_no; Srce_sys; DQ_error; DQ_error; DQ_error;
- - - -
-
- - - -
-
- - - -
-
- - - -
-

My problem is the following:
If I do a pivot from this information, each column will be a field in
the pivot.

I want columns C, D and E to be just one field, because they all
represent the heading "DQ_error". Is it possible to "merge" these 3
columns so they can be just one field in the pivot.

I know I could do a lot of copying and pasting but in the report there
are about 19 columns with the heading DQ_error so I'm trying to avoid
that.

Thanks
 
one option is to use msquery to access the data and write a union quer
that returns just the columns acc_no, srce_sys,dq_error. you need t
rename the dq_error column so their names are unique .. add a number t
the end of each name.. dq_error1, dq_error2 etc.
the query looks like thefollowing if the data is in a csv file calle
'data'.

SELECT data.Acc_no, data.Srce_sys, data.DQ_error1
FROM data.csv data
union all
SELECT data.Acc_no, data.Srce_sys, data.DQ_error2
FROM data.csv data
union all
SELECT data.Acc_no, data.Srce_sys, data.DQ_error3
FROM data.csv data
<etc up to column 19>

I hope someone has an easier suggestion for you.
regards.
 
If the columns contain numbers, you could insert a new column, titled
DQ_errors, and sum the data in all the DQ_error columns.
Then, use the new column in the pivot table.
 
I there's just one DQ_error per row, you could concatenate the values:

=C2&D2&E2
Thanks

Unfortunatelly the column values are not numerical.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top