BookmarkSubscribeRSS Feed
ramesh31
Calcite | Level 5
Hii, Please help , I have BASE DATA in which I have category-wise Customers I want to give the Customers to each employee based on category, (which I have mentioned the Count) - RESULT REQUIRED TABLE There should not be duplicate of customers Example :- Emp 1 want 27 customer from category A so , pull or extract the Customers from BASE DATA table category A ,So after the extraction the count remaining should be ( 8000-27 = 7973) , for EMP 2 , We want 21 from A category so pull out customers form BASE DATA category A (7973).
7 REPLIES 7
Ksharp
Super User
So what kind of output would you like to see ?
ramesh31
Calcite | Level 5
I would like to see the CUSTOMER , CATEGORY , EMP
Ksharp
Super User
NO. I mean the result table as you showed in your EXCEL .
ramesh31
Calcite | Level 5

I have attached the file for the data ( Sheet - DATA)

So, Form base data, I wanted to extract the Customers.

Ksharp
Super User
What is your rules? How can you get RESULT REQUIRE from BASE DATA ? Where is EMP NAME coming from ? BASE DATA don't have it .
Kurt_Bremser
Super User

Please supply your example data in a data step with cards;

I won't open a MS Office file from the web because of security considerations. I guess the same goes for most contributors here.

ramesh31
Calcite | Level 5
 RESULT REQUIRED         
 CATEGORY OF CUSTOMER    BASE DATA  
EMP ABCD    CATEGORYCOUNT OF TOTAL CUSTOMERS  
127301829    A8000  
221181721    B12000  
310181028    C9000  
413242417    D11000  
523121829        
613291326  
 
   
 
 
727112318   
816162716   
925132027   
1013262528   
1124121429   
1212202522   
1314122426   
1428222027   
1530273013   
1612251821   
1713131517        
1817181428        
1911251220        
             
             

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 7 replies
  • 3284 views
  • 0 likes
  • 3 in conversation