BookmarkSubscribeRSS Feed
CesarOmarHR
Calcite | Level 5

I'm trying to generate a summary table consisting of number of employees involved in tasks at certain hour ranges. But when creating the table, an employee that made a task twice in the hour range gets counted double.

                                                                      January         

                         Sunday     Monday      Tuesday     Wednesday     Thursday     Friday     Saturday

     8:00-8:59          8               17               20               9                         11          23          47

     9:00-9:59

10:00-10:59

And the correct

count is                 6                12               16               4                         8             21          42

Using EG, how it is possible to get a non repeating count of IDEmployee?

Thanks in advance

César

3 REPLIES 3
ballardw
Super User

It would be helpful to show generated code, but from your description you may have included time in the criteria. If the actual times are different, i.e. 8:15 and 8:30 they are distinct records. You may get around this by including something like Hour(time) in the distinct criteria.

CesarOmarHR
Calcite | Level 5

Thanks, instead of using a reduced form with the time format (time2.) i'll make the format you suggest to see if summary table avoids repeating IDemployee when counting.

CesarOmarHR
Calcite | Level 5

It didn't help, eventhough my date variables (Hour, day and month) the summary table keeps on counting repeating IDemployee numbers.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

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
  • 776 views
  • 0 likes
  • 2 in conversation