Desktop productivity for business analysts and programmers

can anyone help me out to get this output

Reply
N/A
Posts: 0

can anyone help me out to get this output

can anyone help me out to get this output through EG task if any.
dept=10 sub_dept=1 -----------------------

Emp_id Emp_name bonus salary

1 abc 100 1000
2 xyz 100 1000
3 hshd 100 1000
4 jkcj 100 1000
5 jkdj 100 1000
-------- ------
sub_dept 5000


---------------------- dept=10 sub_dept=2 -----------------------

Emp_id Emp_name bonus salary

6 hvcyudzv 100 1000
7 hfyqwwe 100 1000
8 rsr 100 1000
-------- ------
sub_dept 3000
SAS Super FREQ
Posts: 8,718

Re: can anyone help me out to get this output

Hi:
This looks like the output from a List Data task. On the EG menu, it's under the choice DESCRIBE --> List Data.

In the TASK ROLE pane of the List Data task, you would make your DEPT and SUB-DEPT the "Group analysis by" variables and then your Emp_id, Emp_name, bonus and salary variables would be the "List variables". You would also want to have bonus and/or salary be the "Total of" variables.

cynthia
N/A
Posts: 0

Re: can anyone help me out to get this output

ya I know but the thing is when i keep two columns in my group by as you said then i get two totals for each subgroup.
i just want sub total for salary for each dept,subdept pair
SAS Super FREQ
Posts: 8,718

Re: can anyone help me out to get this output

Sunil:

--If you only want totals for Salary, then just put Salary in the "Total of" Role.
-- Do not put any variable under the "Subtotal of" Role.
--Then just put your 2 variables Dept and Sub-Dept under the "Group Analysis By" role.

This should give you just one subtotal for each Sub-Dept EXCEPT at the very bottom where you should see a total line for Sub-Dept, then a total line for Dept, then an OVERALL total line.

In order to selectively get subtotals, you'd have to move beyond the LIST DATA task and into the world of PROC REPORT. At the present time, PROC REPORT can only be submitted via a code node. (In the future, there are plans for a GUI interface to PROC REPORT in EG.)

If you cannot get the LIST data task working the way you want or if you need help with a PROC REPORT solution, your best bet is to contact SAS Tech Support.

cynthia
Ask a Question
Discussion stats
  • 3 replies
  • 95 views
  • 0 likes
  • 2 in conversation