Help using Base SAS procedures

proc report error: There is no statistic associated with tot_per

Accepted Solution Solved
Reply
Regular Contributor
Posts: 196
Accepted Solution

proc report error: There is no statistic associated with tot_per

tot_per=catx("% ,",per_task,tot) where per_task and tot are both numeric values.
I'm trying to create the following table:

proc report data=task_groups1 nowd contents="Claims" out=test

  style(header)=[font_weight=bold background=CX90D9D7];

  options missing='0';

  column task_grp bu, (tot_per);

  define task_grp / group 'Task' order=data;

  define bu / across '';

  define tot_per / '' style(column)={just=c};
run;

How do I fix the following error?
"ERROR: There is no statistic associated with tot_per."

Thank you.


Accepted Solutions
Solution
‎01-21-2014 07:00 PM
Respected Advisor
Posts: 3,777

Re: proc report error: There is no statistic associated with tot_per

Data would be helpful.

I think this is a case where you need a dummy variable, something like...

column task_grp bu, (tot_per) dummy;

define dummy / noprint;

I could test this if you supplied some data.

View solution in original post


All Replies
Solution
‎01-21-2014 07:00 PM
Respected Advisor
Posts: 3,777

Re: proc report error: There is no statistic associated with tot_per

Data would be helpful.

I think this is a case where you need a dummy variable, something like...

column task_grp bu, (tot_per) dummy;

define dummy / noprint;

I could test this if you supplied some data.

Regular Contributor
Posts: 196

Re: proc report error: There is no statistic associated with tot_per

That works.

Will a compute block allow me to show blank cells as 0%, 0?

Or is there a better way?

Thank you.

Respected Advisor
Posts: 3,777

Re: proc report error: There is no statistic associated with tot_per

I would format the character data cells to look exactly like I want them to look, in the data step where you create tot_per. 

Regular Contributor
Posts: 196

Re: proc report error: There is no statistic associated with tot_per

I don't have missing information in the data step. Only when proc report creates the table do I have blank cells due to combinations being created that don't exist in the data step. I could manually create these combinations in the data step, but that would be quite a bit of manual coding.

Respected Advisor
Posts: 3,777

Re: proc report error: There is no statistic associated with tot_per

It wont be to hard to create the "missing" cells.  I think that is easier that using CALL DEFINE espically on an across variable.  Show some data.

🔒 This topic is solved and locked.

Need further help from the community? Please ask a new question.

Discussion stats
  • 5 replies
  • 475 views
  • 0 likes
  • 2 in conversation