• Community
    • Home
    • Welcome
      • Getting Started
      • Community Memo
      • All Things Community
      • SAS Customer Recognition Awards (2024)
      • SAS Customer Recognition Awards (2023)
    • SAS Community Library
    • SAS Product Suggestions
    • Upcoming Events
    • SAS Customer Recognition Awards
    • All Recent Topics
  • Learn
    • New SAS User
    • SAS Software for Learning Community
    • Ask the Expert
    • SAS Certification
    • SAS Tips from the Community
    • SAS Training
      • Programming 1 and 2
      • Advanced Programming
      • Course Case Studies and Challenges
      • Trustworthy AI
    • SAS Global Forum Proceedings 2021
    • Tech Report Archive
    • SAS Insights Archive
  • Programming
    • SAS Programming
    • SAS Procedures
    • SAS Enterprise Guide
    • SAS Studio
    • Graphics Programming
    • ODS and Base Reporting
    • SAS Code Examples
    • SAS Web Report Studio
    • Developers
  • Analytics
    • Statistical Procedures
    • SAS Data Science
    • Mathematical Optimization, Discrete-Event Simulation, and OR
    • SAS/IML Software and Matrix Computations
    • SAS Forecasting and Econometrics
    • Streaming Analytics
    • Research and Science from SAS
  • SAS Viya
    • SAS Viya
    • SAS Viya on Microsoft Azure
    • SAS Viya Release Updates
    • Moving to SAS Viya
    • SAS Visual Analytics
    • SAS Visual Analytics Gallery
    • Your Journey to Success
    • SAS Viya Workbench
      • SAS Viya Workbench: Getting Started
      • SAS Viya Workbench Discussion
      • SAS Viya Workbench: Release Updates
  • Administration
    • Administration and Deployment
    • Architecture
    • SAS Hot Fix Announcements
    • SUGA
  • Solutions
    • Microsoft Integration with SAS
    • Decisioning
    • SAS Decision Builder
    • Data Management
    • Customer Intelligence
      • SAS Customer Intelligence
      • SAS Customer Intelligence 360 Release Notes
      • SAS 360 Match
    • Risk and Fraud
      • SAS Risk Management
      • Fraud, AML and Security Intelligence
      • SAS Risk Release Updates
      • Risk & Finance Analytics
      • Insurance Fraud
      • MRM AI Governance Working Group
      • SAS Quant Community
    • SAS Health
      • SAS Health and Life Sciences
      • SAS Life Science Analytics Framework
  • Hubs
    • Regional Hubs
      • SAS User Groups
      • SAS Community Nordic
      • AML Nordic User Group
      • SAS Japan
      • SAS Korea
      • CoDe SAS German
      • SAS Plattform Netzwerk
      • SAS Brazil Community
      • SAS Spanish Community
      • SAS Users Group in Israel
      • 欢迎来到SAS中文社区!
      • Ottawa Area SAS Users' Society
      • Toronto Area SAS Users Group
      • SAS Türkiye Community
    • Special Interest Hubs
      • SAS Hacker's Hub
      • SAS Innovate 2025
      • SAS Analytics Explorers
      • The Curiosity Cup
      • SAS Inner Circle Panel
      • SAS Hackathon Team Profiles (Past)
      • SAS Explore
      • Reporting and Optimization
      • Intern Alumni Network Community
Sign In

Search the Community

Showing results for 
Search instead for 
Did you mean: 
Search Options
  • Subscribe to RSS Feed for this Search
Advanced Hide Advanced
  • Posts
  • Users
  • Places
  • Products
Advanced Search Options
Search Modifiers:
You can apply modifiers to the terms you enter in the search field.
Use quotes to search for an "exact phrase".
Use the plus sign to search for +one +or +more +words.
Use the minus sign to -exclude -certain -words from your search.
Limits search results to topics that have no replies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
305 results
Sorted by:
Best Match
  • Date
  • Views
  • Likes
  • Replies
  • Best Match

ID variable in proc transpose has multiple values per record

by Obsidian | Level 7 mitrakos in SAS Programming
‎01-24-2025 04:26 PM
‎01-24-2025 04:26 PM
...hree questions in the survey has two questions that can have multiple options selected, and when I use proc transpose with let option it only captures one of the options. I'm unsure of how to have all t...
Show results in replies (1)
  • ...tatement. proc transpose data=have prefix=Q delim=_ out=wide(drop=_name_); by record_id labcode p...

Transposing with multiples values per ID and year.

by Calcite | Level 5 Pechan_Uvas in Advanced Programming
‎03-20-2023 10:21 PM
‎03-20-2023 10:21 PM
...olumns, values in rows) to a long one (variable name in one column, values as columns per year and sequence). It works very well when values are unique, but failed for some datasets as there are multiple o...
Labels:
  • reshape
  • Transpose
Show results in replies (1)
  • Should the values of VAR_B in the last 4 rows of the initial data table match those in your "w...

PROC TRANSPOSE with multiple variables

by Obsidian | Level 7 greg6363 in SAS Programming
‎12-13-2019 08:37 PM
‎12-13-2019 08:37 PM
I am attempting to combine multiple account records with multiple variables into one observation with the TRANSPOSE procedure but I keep getting the following error:   ERROR: The ID1 valu...
Show results in replies (2)
  • ...0 20 2 new_name 30 40 ; proc transpose data=have out=want ; by id1 ; id id2 ; var var1-var2; r...
  • I added the var COL1 code to the second PROC TRANSPOSE statement and it produced the output in t...

Manipulating Data in Base SAS® Part 6 – Transpose

by Ammonite | Level 13 SASJedi in SAS Communities Library
‎11-06-2024 01:27 PM
2 Likes
‎11-06-2024 01:27 PM
2 Likes
...erial; /* Array of new variables to accept values */ array val[*] $2 Value1-Value5; /* Multiple input rows for one output row - need to retain values */ retain Value1-Value5; if first.id then do; /* C...
  • Find more articles tagged with:
  • GEL
Labels:
  • Data Management
  • SAS Programming

proc transpose copy multiple variables

by Calcite | Level 5 rj438 in SAS Data Management
‎11-11-2018 02:43 PM
‎11-11-2018 02:43 PM
Hi all, I have a dataset that looks like this. I want to transpose it with the SBP_FU values for each month as the variables by ID, but also retain the first and last followup dates. I was able to d...
Show results in replies (1)
  • ...14 09/26/2006 6 514 120 12/25/2006 9 514 ; proc transpose data=have out=w(drop=_:) prefix=SBP_ s...

How to transpose from same row with multiple variables?

by Obsidian | Level 7 Moraes86 in SAS Programming
‎07-30-2021 04:28 PM
‎07-30-2021 04:28 PM
Hi community,   I would like to know how to transpose values from a table that I have to table that I want as it is described below: What I have ID Marketed Value1 Valu...
Show results in replies (1)
  • ...roc transpose data=temp out=want(drop=_name_); by id; var val; id var; run; proc print data=want n...

Transpose your analysis data with the %MAKELONG and %MAKEWIDE macro

by SAS Employee gsvolba in SAS Communities Library
‎01-23-2022 07:01 PM
3 Likes
‎01-23-2022 07:01 PM
3 Likes
...ontains the values that shall be transposed.   The output data (only 3 dogs are shown) looks as follows:   Dog ID Drug Depleted _NAME_ histamine0 h...
Labels:
  • Data Management
  • Data Mining
  • Data Science
  • SAS Programming
  • Statistical Procedures
  • Tips and Tricks

How do I transpose a data set that has multiple values for an ID varia...

by Lapis Lazuli | Level 10 Hello_there in SAS Programming
‎08-23-2022 10:26 AM
‎08-23-2022 10:26 AM
I have this data set that I want to transform so that it's one row per ID. The problem is that there are multiple values for the an ID variable.   Here is the data set in question: data h...
Show results in replies (2)
  • ...tatement that is for a variable used to NAME output variables and generally doesn't allow multiple values...
  • PROC TRANSPOSE can handle that example very easily.  Perhaps you over simplified your e...

transpose multiple columns and getting output in columns

by Quartz | Level 8 deega in SAS Programming
‎03-10-2017 12:50 AM
‎03-10-2017 12:50 AM
...000 2000 3000 4000 1000   However, if I write the following program I get values of different columns in different rows.   proc transpose data=Y out=check  ; id ID; var d a...
Show results in replies (1)
  • I tried the same. Transposed and then merged. I was wondering if there is any other option.

Is there a way to proc transpose a column with multiple values into co...

by Pyrite | Level 9 LL5 in New SAS User
‎02-19-2020 11:32 AM
‎02-19-2020 11:32 AM
Hi all, this may sound incompetent but I would like to explore the possibilities to proc transpose columns with different values into correspond columns.  Let's say I have a d...
Show results in replies (1)
  • You need to sort the data by ID to get PROC TRANSPOSE to operate on each ID group separately . Y...
  • « Previous
    • 1
    • 2
    • 3
  • Next »
Powered by Khoros