good day,
May someone please assist me.
I have a dataset where I need to create subgroups, the problem though is that these groups overlap and its one variable that is in use.
example if data is as follows:
Acct number ACC002CRT Industry
1 5 clothing
1 3 cellular
1 2 insurance
2 1 loans
2 0 insurance
3 3 mortgage and bonds
4 9 vehicle
4 13 loans
now the subgroups that need to be created based on the data are:
if ACC_CRT >=12 then A01;
if 6 <=ACC_CRT <12 then A02;
if ACC_CRT >=9 then C01;
if ACC_CRT =1 then F22;
if ACC_CRT < 6 then B05;
etc.
also I need to count the number of industries each account is in.
e.g. 2 or more industries then C10;
An assistance to this will be highly appreciated.
You can create Multilabel Formats, this works in some situations, but not others (and you didn't really describe what you do after you create overlapping groups)
Based on the data and the rules you've posted: Can you please show us how the desired result should look like?
@NTR wrote:
so this is my data where I need assistance with counting number of industries for each observation.
Acct_no Industry Date
24541463 Home ware 01OCT2017
24541463 Finance houses 01OCT2017
24541463 Clothing 01OCT2017
24541463 Clothing 01OCT2017
And where is the ACC_CRT or ACC002CRT variable you referenced in the first post?
Each "observation" above only has one industry. Do you mean per Acct_no?
@NTR wrote:
now I'm struggling with the counting of the industries, if you may please assist.
Explain this. What exactly are you doing that isn't working? Show us the SASLOG. Show us (a portion of) the desired outcome as an actual table instead of words.
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.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.