BookmarkSubscribeRSS Feed
NSL
Calcite | Level 5 NSL
Calcite | Level 5

Hi, I have a set of report with different lines of items for each report, I would like to distribute the reports equally to a group of people by considering their workload and lines of items in the report, please find below for the data sample:

 

Report    

ReportLine items in the reportSubmitted by Employee 
13Dong, Bin
21Hu, Guang Yin
34Jin, Stan
41Li, Yan Hong
55Shen, Ting
61Shen, Ting
717Sun, Tristan
81Xue, Guohua
92Xue, Guohua

 

Group of people:

Leng with workload of 0.7

Po with workload of 1.0

 

The distribution should meet the following requirements:

1) Report submitted by the same employee should distribute to the same person

2) Number of report distribute to the 2 persons should be equal (or 4 & 5 for total of 9)

3) Report line items should be equally distributed

4) Workload should be considered

 

Much appreciate if anyone could suggest me the code which can do the above distribution well, thank you!!

 

3 REPLIES 3
ballardw
Super User

I have no idea what this means:

Leng with workload of 0.7
Po with workload of 1.0

How do we determine "workload" based on what you show.

 

Can you show what you would expect the output to appear like for your example?

And then show how each item in the result is determined according to your rules.

NSL
Calcite | Level 5 NSL
Calcite | Level 5

Hi, there is two ppl who need to process report everyday, one is Leng and another is Po, workload will be vary from day to day, for example, when workload equal to 1.0 for both of them, and today we have 10 reports here, then 10 divided by 2.0 and times 1.0, each of them will need to process 5 reports.

 

For my question above, please find below for details:

Total report received: 9 reports

Total line items in the reports: 35

 

The expected outcome:

Leng with workload of 0.7 should get 4 reports (9*0.7/1.7), in the 4 reports, it should have 14 line items (35*0.7/1.7)

Po with workload of 1.0 should get 5 reports (9*1.0/1.7), in the 5 reports, it should have 21 line items (35*1.0/1.7)

 

And there is a requirement where same report submitted by same employee should be distributed to the same person, for example, Alex has submitted 2 reports today, these two reports should be distributed to Leng or Po, it cannot be distributed one to Leng and one to Po. Hence, due to there is a such requirement, the outcome wont be distributed equally, it might have vary of one or two line items.

NSL
Calcite | Level 5 NSL
Calcite | Level 5

 

ReportLine items in the reportSubmitted by Employee Distributed to
13Dong, BinLeng
21Hu, Guang YinPo
34Jin, StanLeng
41Li, Yan HongPo
55Shen, TingLeng
61Shen, TingLeng
717Sun, TristanPo
81Xue, GuohuaPo
92Xue, GuohuaPo

 

Column 4 is the expected outcome where Leng will get 4 reports with total of 13 line items and Po will get 5 reports with total of 22 line items, this is bcs same report from same employee must goes to the same person.

 

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!

Submit your idea!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 501 views
  • 0 likes
  • 2 in conversation