cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
%3CLINGO-SUB%20id%3D%22lingo-sub-582643%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%E5%B0%86%E8%A1%8C%E4%B8%8E%E4%B8%B2%E8%A1%8C%E6%95%B0%E6%8D%AE%E7%BB%84%E5%90%88%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-582643%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3E%E6%82%A8%E5%A5%BD%20-%20%E6%9C%89%E4%B8%80%E4%BA%9B%E5%85%B3%E4%BA%8E%E6%AD%A4%E7%9A%84%E5%B8%96%E5%AD%90%EF%BC%8C%E4%BD%86%E5%AE%83%E4%BB%AC%E6%B2%A1%E6%9C%89%E8%A7%A3%E5%86%B3%E8%BF%99%E4%B8%AA%E5%85%B7%E4%BD%93%E9%97%AE%E9%A2%98%3C%2FP%3E%3CP%3E%E6%88%91%E9%9C%80%E8%A6%81%E4%BB%8E%E7%A4%BA%E4%BE%8B%201%20%E8%BD%AC%E5%88%B0%E7%A4%BA%E4%BE%8B%202%E3%80%82%E6%8C%89%20ID%20%23%20%E5%B0%86%E8%A1%8C%E5%90%88%E5%B9%B6%E4%B8%BA%E4%B8%80%E8%A1%8C%EF%BC%8C%E5%B9%B6%E6%8C%89%E9%A1%BA%E5%BA%8F%E5%AF%B9%E9%BD%90%E6%95%B0%E6%8D%AE%E3%80%82%E8%B0%A2%E8%B0%A2%3C%2FP%3E%3CP%3E%3CBR%20%2F%3E%3CU%3E%E7%A4%BA%E4%BE%8B1%3C%2FU%3E%3C%2FP%3E%3CP%3Eid%20%E8%AE%BF%E9%97%AE%23.%E8%81%8C%E4%B8%9A%E9%AB%98%E5%B0%94%E5%A4%AB%E7%90%83%E5%8D%8F%E4%BC%9A%3C%2FP%3E%3CP%3E1%201%205%3C%2FP%3E%3CP%3E1%202%203%3C%2FP%3E%3CP%3E2%203%2012%3C%2FP%3E%3CP%3E2%205%207%3C%2FP%3E%3CP%3E2%206%204%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CU%3E%E7%A4%BA%E4%BE%8B2%3C%2FU%3E%3C%2FP%3E%3CP%3EID%E3%80%82%E8%AE%BF%E9%97%AE%23PGA%E3%80%82%E8%AE%BF%E9%97%AE%EF%BC%83%E3%80%82%E8%81%8C%E4%B8%9A%E9%AB%98%E5%B0%94%E5%A4%AB%E7%90%83%E5%8D%8F%E4%BC%9A%E3%80%82%E8%AE%BF%E9%97%AE%EF%BC%83%E3%80%82%E8%81%8C%E4%B8%9A%E9%AB%98%E5%B0%94%E5%A4%AB%E7%90%83%E5%8D%8F%E4%BC%9A%23%3C%2FP%3E%3CP%3E1.%201%205%202%203%3C%2FP%3E%3CP%3E2.3%2012%205%207%206%204%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-582643%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CLINGO-LABEL%3E%E9%AB%98%E7%BA%A7%E7%BB%9F%E8%AE%A1%E5%BB%BA%E6%A8%A1%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3E%E5%86%85%E5%AE%B9%E7%BB%84%E7%BB%87%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-583131%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%E5%9B%9E%E5%A4%8D%EF%BC%9A%E5%B0%86%E8%A1%8C%E4%B8%8E%E4%B8%B2%E8%A1%8C%E6%95%B0%E6%8D%AE%E7%BB%84%E5%90%88%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-583131%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CBLOCKQUOTE%3E%3CHR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F23793%22%20target%3D%22_blank%22%3E%40jsolo01%3C%2FA%3E%E5%86%99%E9%81%93%EF%BC%9A%3CBR%20%2F%3E%3CP%3E%E8%BF%99%E6%A0%B7%E5%8F%AF%E8%A1%8C%EF%BC%81%E8%B0%A2%E8%B0%A2%3C%2FP%3E%3CHR%20%2F%3E%3C%2FBLOCKQUOTE%3E%3CP%3E%E8%BF%B7%E4%BA%BA%E7%9A%84%EF%BC%81%20%E4%BD%A0%E8%83%BD%E6%A0%87%E8%AE%B0%E4%B8%80%E4%B8%8B%E5%90%97%3CA%20href%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F14366%22%20target%3D%22_blank%22%3E%40jthi%3C%2FA%3E%E9%82%A3%E4%B9%88%E7%AD%94%E6%A1%88%E4%BD%9C%E4%B8%BA%E8%A7%A3%E5%86%B3%E6%96%B9%E6%A1%88%E5%90%97%EF%BC%9F%20...%E5%B9%B6%E6%85%B7%E6%85%A8%E5%9C%B0%E7%BB%99%E4%BA%88%E5%AE%83%E8%8D%A3%E8%AA%89%2F%E5%96%9C%E6%AC%A2...%E5%8F%AA%E6%98%AF%E4%B8%BA%E4%BA%86%E4%BF%9D%E6%8C%81%E4%BA%BA%E4%BB%AC%E7%9A%84%E7%A7%AF%E6%9E%81%E6%80%A7%E3%80%82%20%3CLI-EMOJI%20id%3D%22lia_slightly-smiling-face%22%20title%3D%22%3Acara_con_una_leve_sonrisa%3A%22%3E%3C%2FLI-EMOJI%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-582807%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%E5%9B%9E%E5%A4%8D%EF%BC%9A%E5%B0%86%E8%A1%8C%E4%B8%8E%E4%B8%B2%E8%A1%8C%E6%95%B0%E6%8D%AE%E7%BB%84%E5%90%88%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-582807%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3E%E8%BF%99%E6%A0%B7%E5%8F%AF%E8%A1%8C%EF%BC%81%E8%B0%A2%E8%B0%A2%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-582685%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%E5%9B%9E%E5%A4%8D%EF%BC%9A%E5%B0%86%E8%A1%8C%E4%B8%8E%E4%B8%B2%E8%A1%8C%E6%95%B0%E6%8D%AE%E7%BB%84%E5%90%88%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-582685%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3E%E4%B8%80%E7%A7%8D%E9%80%89%E6%8B%A9%E6%98%AF%E5%88%9B%E5%BB%BA%E6%96%B0%E7%9A%84%E5%88%86%E7%BB%84%E5%88%97%EF%BC%8C%E4%BE%8B%E5%A6%82%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3ECol%20Cumulative%20Sum(1%2C%20%3Aid)%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22jthi_3-1671207892330.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22jthi_3-1671207892330.png%22%20style%3D%22width%3A%20315px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22jthi_3-1671207892330.png%22%20style%3D%22width%3A%20315px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F48381i001723F1B839A191%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22jthi_3-1671207892330.png%22%20alt%3D%22jthi_3-1671207892330.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%E4%B9%8B%E5%90%8E%E4%BD%A0%E5%8F%AF%E4%BB%A5%E6%8B%86%E5%88%86%E8%A1%A8%E6%A0%BC%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22jthi_0-1671207782024.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22jthi_0-1671207782024.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22jthi_0-1671207782024.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F48378i99D05ED20E0CF540%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22jthi_0-1671207782024.png%22%20alt%3D%22jthi_0-1671207782024.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%E5%B9%B6%E6%9C%80%E7%BB%88%E5%BE%97%E5%88%B0%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22jthi_1-1671207790056.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22jthi_1-1671207790056.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22jthi_1-1671207790056.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F48379i725D8F04E2C1C874%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22jthi_1-1671207790056.png%22%20alt%3D%22jthi_1-1671207790056.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%E7%84%B6%E5%90%8E%E4%BD%A0%E5%8F%AF%E4%BB%A5%E7%A7%BB%E5%8A%A8%E5%88%97%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22jthi_2-1671207877254.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22jthi_2-1671207877254.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22jthi_2-1671207877254.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F48380i0F387AA48DBF14D8%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22jthi_2-1671207877254.png%22%20alt%3D%22jthi_2-1671207877254.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Choose Language Hide Translation Bar
jsolo01
Level I

Combining rows with serial data

Hi - there are a few posts on this but they dont address this specific issue

i need to get from example 1 to example 2.  combine rows by ID # into one row with data aligned sequentially.  Thanks


example 1

id    visit#.   PGA 

1      1          5

1      2          3 

2      3        12

2      5         7

2      6         4

 

example 2

id.   visit#    PGA.   visit#.   PGA.    visit#.  PGA#

1.      1         5          2           3     

2.       3        12        5           7           6         4

1 ACCEPTED SOLUTION

Accepted Solutions
jthi
Super User

Re: Combining rows with serial data

One option is to create new grouping column with something like

Col Cumulative Sum(1, :id)

jthi_3-1671207892330.png

 

after this you can split the table

jthi_0-1671207782024.png

and end up with

jthi_1-1671207790056.png

then you can move the columns around

jthi_2-1671207877254.png

 

-Jarmo

View solution in original post

3 REPLIES 3
jthi
Super User

Re: Combining rows with serial data

One option is to create new grouping column with something like

Col Cumulative Sum(1, :id)

jthi_3-1671207892330.png

 

after this you can split the table

jthi_0-1671207782024.png

and end up with

jthi_1-1671207790056.png

then you can move the columns around

jthi_2-1671207877254.png

 

-Jarmo
jsolo01
Level I

Re: Combining rows with serial data

that works!  Thanks

fja
fja
Level III

Re: Combining rows with serial data


@jsolo01 wrote:

that works!  Thanks


Lovely! Could you mark @jthi 's answer as a solution then? ... and generously spare it a kudo/like ...  just to keep people motivated.