Removing duplicates in transaction data

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Removing duplicates in transaction data

Mark Webb-5
I'm attempting to remove duplicated within shopper using SPSS GUI data/Identify duplicate cases- but not getting exactly what I need.

Y = Duplicate  N = Unique  [SPSS uses 0,1]
Shopper   Item   Gui   What I want
1              A        Y          Y
1              B        N          N
1              A        Y          N
2              D        N          N
2              E        N          N
2              A        N          N

If I remove duplicated in the my Gui attempt I get -

Shopper   Item   Gui
1              B        N
2              D        N
2              E        N
2              A        N

But then the fact that shopper 1 bought A is lost. How can I get the duplication logic to work within shopper? -
 I only want duplication within shopper to be removed not between shopper.
Is there a way - either Gui or syntax?
Thanking you in advance.
Regards
Mark
--
Mark Webb

Line +27 (21) 786 4379
Cell +27 (72) 199 1000 [Poor reception]
Fax  +27 (86) 260 1946

Skype       tomarkwebb
Email       [hidden email] 
Reply | Threaded
Open this post in threaded view
|

Re: Removing duplicates in transaction data

Mark Webb-5
Thank you Todd - works perfectly - I never considered sorting first.

Mark Webb

Line +27 (21) 786 4379
Cell +27 (72) 199 1000 [Poor reception]
Fax  +27 (86) 260 1946

Skype       tomarkwebb
Email       [hidden email] 
On 2012/10/19 01:26 PM, Todd Alan Zoblotsky (tzbltsky) wrote:

I would sort by Shopper and Item, then identify duplicates by Shopper and Item.  Then you just take the first record, which should give you all of the unique cases.

 

Todd

 

From: SPSSX(r) Discussion [[hidden email]] On Behalf Of Mark Webb
Sent: Friday, October 19, 2012 3:54 AM
To: [hidden email]
Subject: Removing duplicates in transaction data

 

I'm attempting to remove duplicated within shopper using SPSS GUI data/Identify duplicate cases- but not getting exactly what I need.

Y = Duplicate  N = Unique  [SPSS uses 0,1]
Shopper   Item   Gui   What I want
1              A        Y          Y
1              B        N          N
1              A        Y          N
2              D        N          N
2              E        N          N
2              A        N          N

If I remove duplicated in the my Gui attempt I get -

Shopper   Item   Gui
1              B        N
2              D        N
2              E        N
2              A        N

But then the fact that shopper 1 bought A is lost. How can I get the duplication logic to work within shopper? -
 I only want duplication within shopper to be removed not between shopper.
Is there a way - either Gui or syntax?
Thanking you in advance.
Regards
Mark

--
Mark Webb
 
Line +27 (21) 786 4379
Cell +27 (72) 199 1000 [Poor reception]
Fax  +27 (86) 260 1946
 
Skype       tomarkwebb
Email       [hidden email] 

Reply | Threaded
Open this post in threaded view
|

Automatic reply: Removing duplicates in transaction data

Genevieve Odoom
Thanks for your email. I will be out of the office on Friday October 19th, returning on Monday, October 22nd with limited access to email. I will respond to all emails when I return.

Genevieve Odoom
Policy and Program Analyst
OANHSS
Suite 700 - 7050 Weston Rd. Woodbridge,
ON L4L 8G7
Tel: (905) 851-8821 x 241 Fax: (905) 851-0744
[hidden email]
 www.oanhss.org<https://mail.oanhss.org/ecp/Organize/www.oanhss.org>

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: Removing duplicates in transaction data

Jon K Peck
In reply to this post by Mark Webb-5
If you define duplicates as identical values for shopper and item, you should get what you want, if I understand the goal.


Jon Peck (no "h") aka Kim
Senior Software Engineer, IBM
[hidden email]
new phone: 720-342-5621




From:        Mark Webb <[hidden email]>
To:        [hidden email],
Date:        10/19/2012 02:59 AM
Subject:        [SPSSX-L] Removing duplicates in transaction data
Sent by:        "SPSSX(r) Discussion" <[hidden email]>




I'm attempting to remove duplicated within shopper using SPSS GUI data/Identify duplicate cases- but not getting exactly what I need.

Y = Duplicate  N = Unique  [SPSS uses 0,1]
Shopper   Item   Gui   What I want

1              A        Y          Y

1              B        N          N

1              A        Y          N

2              D        N          N
2              E        N          N

2              A        N          N


If I remove duplicated in the my Gui attempt I get -


Shopper   Item   Gui
1              B        N
2              D        N
2              E        N

2              A        N

But then the fact that shopper 1 bought A is lost. How can I get the duplication logic to work within shopper? -
I only want duplication within shopper to be removed not between shopper.
Is there a way - either Gui or syntax?
Thanking you in advance.
Regards
Mark

--
Mark Webb

Line +27 (21) 786 4379
Cell +27 (72) 199 1000 [Poor reception]
Fax  +27 (86) 260 1946

Skype       tomarkwebb
Email      
targetlinkmark@...