Please review the guidance on posting new questions. You have provided no information or even a question as far as I can tell. Post test data in the form of a datastep, show what you want out from that, and explain any logic in between.
proc freq is one of the basic tools for counting.
with out examples of what your data might actually look like it is very hard to go much further than that.
The data is about the sales of product in different country with their product id and other details. So I need to find out the most popular product that is the product which is having great sale with respect to country.
Again:
Post test data in the form of a datastep, show what you want out from that, and explain any logic in between.
At a guess do something like:
proc sql; create table want as select country, value from (select country,sum(value) as value from have group by country) having value=max(value); quit;
Or a proc means and output sum, then take top result.
Vague question without data, equals vague answer without code or data.
So sum the sales of each products in each country and rank them. PROC MEANS will sum them and PROC RANK will rank them to find the top products.
@SV75 wrote:
The data is about the sales of product in different country with their product id and other details. So I need to find out the most popular product that is the product which is having great sale with respect to country.
@vamshirajd you need to ask a complete question, providing all the relevant details.
Note that hijacking another's 2-year-old thread is not a way for getting good answers. Please post your question in a new thread of your own, with a descriptive subject line, and pertinent details. Example data (posted as a data step with datalines in a code box) and expected outcome will be helpful.
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
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.
Ready to level-up your skills? Choose your own adventure.