BookmarkSubscribeRSS Feed
Sandhya
Fluorite | Level 6

Hi

I've a dataset with 4 variables.  Example of the Table is

IDCODEMOD
AMOUNT
110100
11020110
110AA120
11022105
110BB130
21020103
21022109
210BB115

I wanted to consolidate it like

MOD
NONE20AA22
BB
NONE1(100)1(210)1(220)
201(210)1(110)1(230)
AA
222(459)
BB

It's the total number of id's in each combination and the total amount incurred by it.

Please help in deriving this solution.

Thanks,

Sandy.

1 REPLY 1
PGStats
Opal | Level 21

Could you explain further? The example doesn't seem complete? The combination 20-22 exists in both IDs and there is no total. 20-20 is not a combination in either ID.

PG

PG

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!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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