I want to make a new data set that only shows ID (sorted by ID), the transaction
number, and the total sale for each transaction.
I think I need to first merge the two data sets by Part_no so that I can
compute to total sale, but I'm having trouble with what to do after this to get the proper dataset.
Any help would be much appreciated!
Helena
I think that a SQL join would more appropriate/easier to do.
You can calculate sales per row, and then summarize per transaction no in one step: (pseudo-code):
create table total_sales as
select id, trans_no, quantity * price as total_sale
from sales left join parts
on sales.part_no eq parts.part_no
group by id, trans_no
;
/Linus
Data never sleeps
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.