My proc tabulate
You're asking proc tabulate to use variables in the table crossings AND in the BY groups.
The variables are used twice in your logic, so they appear twice in the output data set and need different names.
From the looks of it and to avoid the root cause for warnings as explained by @ChrisNZ I believe one of below coding options should return what you're after.
proc tabulate data=s_18 format=nlnum32. out=s_18_CF;
class original_currency yearno company_name company_bk company_type_code period_name typeno;
var epifp;
table
Company_Name
*company_bk
,yearno='Year'
*company_type_code='Institutgroup'
*original_currency='Curr'
*period_name='Period'
all='Total'
,all='Total'
*epifp
;
run;
proc tabulate data=s_18 format=nlnum32. out=s_18_CF;
by Company_Name company_bk;
class original_currency yearno company_type_code period_name typeno;
var epifp;
table
yearno='Year'
*company_type_code='Institutgroup'
*original_currency='Curr'
*period_name='Period'
all='Total'
,all='Total'
*epifp
;
run;
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.
Ready to level-up your skills? Choose your own adventure.