BookmarkSubscribeRSS Feed
Fluorite | Level 6

HI I a have a question on a transpose

i have a table that looks like this

BRanch.  Name.    Date.   Compliance.

a1.           Apple.      08/25/14.     Reported

a2.            Apple.      08/25/14.   Reported

a3.             Mustard.    08/25/14.  Not reported

a3.            Mustard.      08/26/14.  Reported

the transpose table I would like it to look like

group Name

08/25/14.                                                                                                   08/26/14

branch.   Count.     total  Reported.  Not reported                .   Count.     total  Reported.  Not reported 

a1.             1.           1.       1

a2.             1.            1.      1

a3.              1.            1.                             1.                                  1.          1.          1

The count / total will change as there is more entries thank you again

Super User

This looks more appropriate for a report than a dataset.

You show a "count" but what is it counting? It looks like you might be counting distinct levels of Name but you don't say that. Same with Totat, total of what?

Also example data should provide data that would give count/total values greater than one as many approaches that work for singleton types of data may not work when there are multiple values.

Fluorite | Level 6

HI Ballardw,

your right sorry my question was incomplete

What the table should look like is like this not reported and report is sum of occuerance ....


apple             2.                       39.                    22.                             7.

                   Uniq count   (Not reported)     Not report.      Reported   Unqui count (reported)

A1.                     1                  34.                       12.                          3

a2.                      1                 5.                        20.                           4

a3.                                          0.                         0.                           0

I hope that helps

Super User

That's a more interesting result but the input data to go along with that is also needed.

Fluorite | Level 6

Hi Ballardw,

The data looks like this

ID.             COMPLIANCE.      Date.        Code

A1.                  yes                08/14/14.        A

A2.                   Yes.               08/15/14.        B

A1.                    No.                 08/15/14.       A

a2.                     No.                  08/14/14.      B

a1.                     Yes.                 08/16/14.       A


I Need the date to be column I need the compliance to be sum an breack out of yes an no... I need the count of ID ... Thanks for your assitance


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
  • 4 replies
  • 2 in conversation