Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to avoid duplicates when export to excel?

Hi,

I have one table which have dimension CustomerID with duplicates. for each CustomerID there are multiple unique ID. My user don't want to see duplicates in CustomerID when exported to excel. but wants all CustomerID with ID. so, I used Pivot table. In qvw it is showing only once instance of CustomerID with ID, but when exporting to excel it is showing duplicate CustomerID.

How to sort this out. Can anyone help me please.

Thanks.

24 Replies
Anonymous
Not applicable
Author

in your other thread for the same requirement, tresco's response which you marked as the helpful answer, is the way to go about your requirement.

Not applicable
Author

Thanks. I showed the one to the user which I marked as helpful answer. But the user don't want that format. why I marked it as helpful is as others can help from this helpful answer. if any one have this issue and anyone is ok( as it will be different in different organisations) with that format.

Please any other solution.

Not applicable
Author

Please any solution?

martynlloyd
Partner - Creator III
Partner - Creator III

Use STORE

Store will allow you to define the output fields, and you can create a CSV file for excel to read. Your user can open the file instead of exporting the pivot.

By using Resident, Distinct, Group By etc. you can build a table for excel, and then DROP it when you have finished:

Store

CustomerID,

MyfieldB as b

from mytable into xyz.csv (txt);

DROP Table mytable

Regards,

Marty.

ashfaq_haseeb
Champion III
Champion III

Hi,

Can you post some sample data to explore.

You need to use macro here.

If you can post sample then I would give it a try.

Regards

ASHFAQ

martynlloyd
Partner - Creator III
Partner - Creator III

Alternatively, create a Pivot just for export, with the required columns, and leave it minimised.  Instruct the user to right click on that control instead of the displayed version.

Regards,

Marty.

sujeetsingh
Master III
Master III

It will be good to use some macro but it will be much complex.

Not applicable
Author

Thanks. Please see attached sample and help me.

Not applicable
Author

Thanks. I tried this and still showing the duplicates.