Hi,
I need to reverse a table in SAS.
For example I have a list of stores (1, ,2, 3, ..., 2000) on the first column and for each store I have a list of customers (1, ,2, 3, ..., 2000) in the following columns, but this list is limited to up to 12 customers (random number of customers per store).
Now I need to reverse the story, i.e. to build a list of costumers sorted from 1 to 2000 on the first column, and for each customer to find from the original table a list of corresponding stores.
How can I do that in SAS?
Thank you!
Not sure I understand what you have. Does the following approximate what your file looks like for the first two stores?:
Store Cust1 Cust2 Cust3 Cust4 Cust5 Cust6 Cust7 Cust8 Cust9 Cust10 Cust11 Cust12
1 24 2 5 6 1000 50 80 900 901 902 903 700
2 54 22 58 76 25 90 70 800 801 802 803 600
and you want to end up with a file that looks like?:
Cust Store
24 1
2 1
5 1
6 1
etc.
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
Use this tutorial as a handy guide to weigh the pros and cons of these commonly used machine learning algorithms.
Find more tutorials on the SAS Users YouTube channel.