BookmarkSubscribeRSS Feed
Dhana18
Obsidian | Level 7

I have a data set like this 

  Location        Date    _NAME_     Measurement

                Cole Pond     02JUN95    Length1         31    
                Cole Pond     02JUN95    Length2         32    
                Cole Pond     02JUN95    Length3         32    
                Cole Pond     02JUN95    Length4         33    
                Cole Pond     03JUL95    Length1         33    
                Cole Pond     03JUL95    Length2         34    
                Cole Pond     03JUL95    Length3         37    
                Cole Pond     03JUL95    Length4         32    
                Cole Pond     04AUG95    Length1         29    
                Cole Pond     04AUG95    Length2         30    
                Cole Pond     04AUG95    Length3         34    
                Cole Pond     04AUG95    Length4         32    
                Eagle Lake    02JUN95    Length1         32    
                Eagle Lake    02JUN95    Length2         32    
                Eagle Lake    02JUN95    Length3         33    
                Eagle Lake    02JUN95    Length4          .    
                Eagle Lake    03JUL95    Length1         30    
                Eagle Lake    03JUL95    Length2         36    
                Eagle Lake    03JUL95    Length3          .    
                Eagle Lake    03JUL95    Length4          .    
                Eagle Lake    04AUG95    Length1         33    
                Eagle Lake    04AUG95    Length2         33    
                Eagle Lake    04AUG95    Length3         34    
                Eagle Lake    04AUG95    Length4          .   

I want it to be like this 

     L
     o                     L      W      L      W      L      W      L      W
     c                     e      e      e      e      e      e      e      e
     a                     n      i      n      i      n      i      n      i
     t               D     g      g      g      g      g      g      g      g
     i               a     t      h      t      h      t      h      t      h
     o               t     h      t      h      t      h      t      h      t
     n               e     1      1      2      2      3      3      4      4

 Cole Pond     02JUN95    31    0.25    32    0.30    32    0.25    33    0.30
 Cole Pond     03JUL95    33    0.32    34    0.41    37    0.48    32    0.28
 Cole Pond     04AUG95    29    0.23    30    0.25    34    0.47    32    0.30
 Eagle Lake    02JUN95    32    0.35    32    0.25    33    0.30     .     .  
 Eagle Lake    03JUL95    30    0.20    36    0.45     .     .       .     .  
 Eagle Lake    04AUG95    33    0.30    33    0.28    34    0.42     .     .  

 

 

edit: via Reeza - fix misspelling in the subject line 

2 REPLIES 2
Reeza
Super User
Your shown input data only has LENGTH, no WEIGHT values. The answer is the same as the one to your previous question, a double transpose or multiple transposes + merging the results.
Dhana18
Obsidian | Level 7
not exactly. one of answer (from grand advisor) seems working. Thank you Grand Advisor.

hackathon24-white-horiz.png

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.

Latest Updates

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 741 views
  • 0 likes
  • 2 in conversation