Recently in the SAS Community Library: SAS' @StuartRogers provides a close look at the new Microsoft Entra Gallery application and details how it can be used.
Hi,
I've a sample input data below and the expected output format.
I need to find number of active customers as per the start date of the year and their based on end date, I've to keep the count added for each year.
Example,
Customer A,H,I - Active from 2004, so we have 3 customers active from 2004 and I'm keeping the count added horizontally for each year and by 2009 one customer got dropped. So for 2010 - customer count was 2.
Similarly I've to populate the same for the next row active from 2005 and followed by other rows.
Could you please suggest me the best approach to get this done ?
Thanks in advance for your help.
... View more
Would u like to help me to categorize market values into three groups labeled as small, mid, and big? FIRMS ARE ASSIGNED TO A SIZE QUARTILE GROUP BASED ON THEIR PREVIOUS MONTH’S MARKET VALUE OF EQUITY THE 0~<25% ARE GROUP BY SMALL SIZE, THE 25%~<50% ARE GROUP BY MEDIUM SIZE, THE 50%~100% ARE GROUP BY BIG SIZE. PROC SORT DATA BY DATE PERMNO MARKET VALUE(SMALL TO BIG), AND GIVE EACH DATE PERMNO MARKET VALUE. DATA SORTED;
SET SORTED;
BY DATE PERMNO;
IF LAST.PERMNO THEN DO;
CALL STREAMINIT(123);
RANK = RANKTIE(LAST_MONTH_MV, 'DESCENDING');
PCTILE = RANK / (LAST.PERMNO + 1);
IF PCTILE < 0.25 THEN SIZE_GROUP = 'SMALL';
ELSE IF PCTILE < 0.50 THEN SIZE_GROUP = 'MEDIUM';
ELSE SIZE_GROUP = 'BIG';
END;
RUN; ERROR 68-185: The function RANKTIE is unknown, or cannot be accessed.
... View more
I used function put to convert a variable from num to char and then save the data as csv. However, when I import the saved csv data I found this variable became back to numeric again. I wonder how to keep the variable as char in the csv data?
... View more
data have;
input ID $ a_cnt $ b_cnt $ month $ L_1 $ L_2 $ Dum;
datalines;
1 2 1 jan A1 b1 0
2 0 0 feb a2 b2 0
3 1 0 mar a1 b2 0
4 0 1 jan a2 b3 0
;
proc print data=have;
proc tabulate data=have;
class l_1 l_2 month;
var a_cnt;
table l_1*l_2, (month all='Total')*(a_cnt='')*(sum='');
run; i am trying to use tabulate to produce a table like below... but i am not able to acheive the same. any help much appreciated.
... View more
Proc export giving additional quotes to the quoted char values.and if u use data step for that it is giving a space or . To numeric values which is not required . Needs to change nothing.now it is , , but want ,, no space no .for missing numeric value.
... View more