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||Line items in the report||Submitted by Employee|
|2||1||Hu, Guang Yin|
|4||1||Li, Yan Hong|
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!!
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.
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.
|Report||Line items in the report||Submitted by Employee||Distributed to|
|2||1||Hu, Guang Yin||Po|
|4||1||Li, Yan Hong||Po|
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.
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.