BookmarkSubscribeRSS Feed
urap
Calcite | Level 5

to maximize the profit check the products providing profit more than 40% of sale amount and increase the quantity of those products to 15 . Also check by what amount do you need to increase the quantity by considering inf_globalsales dataset

data sasclass.inf_globalsales;
infile "/folders/myfolders/dataset.csv/"
dlm="," dsd firstobs=2;
input Order_ID : $30. Order_Date : ddmmyy10. Ship_Date : ddmmyy10. Customer_ID : $20. Segment : $20.
City : $20. State : $20. Country : $20. Category : $20. Sales : dollar20.2
Quantity Discount Profit : dollar20.2;
format Order_Date ddmmyy10. Ship_Date ddmmyy10. Sales : dollar20.2 Profit : dollar20.2;
run;
proc print data=sasclass.inf_globalsales(obs=20);
run;


Screenshot (38).png 

1 REPLY 1
Patrick
Opal | Level 21

@urap

First step before writing any code:

1. Define the problem(s) to be solved (=requirement)

2. Analyze the data you've got (have)

3. Define the result you need (want)

4. Define the logic you need to implement to get from your "have" to your "want" (gap)

 

....and now you're at the point where you can start to think about how to solve this technically and if you don't know "how to" are in a position to ask targeted questions in this forum.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

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
  • 1 reply
  • 816 views
  • 5 likes
  • 2 in conversation