BookmarkSubscribeRSS Feed
Lutze
Calcite | Level 5

Hello All,

I am looking for some advise from more experienced JMP users for the following problem.

I frequently need to work with a data tables that contain up to 4 rows per unit. However some of the system parameters are only recorded for the first enry of an individual unit although applicable for the other rows associated to that unit as well.

In order to be able to analyze and group the data I need these system parameters to be completed for all rows of an unit.

As I have no chance to alter the data recording to the database I need to take care of this after data base extraction before any analysis.

I therefore created a workaround as shown below.

It provides the desired result but is very slow and actually not feasible for data tables with more than 1000 rows.

dt = Current Data Table();

dt<<Sort(By(:unit), Order(Ascending), Replace Table);

:param_1 << Formula (for each row(:param_1 [row()+1] = (if (:unit[row()] == :unit [row()+1],

  :param_1 [row()], :param_1 [row()+1] )),

  ),

  Eval Formula

);

I am sure there is a more efficient and elegant way to solve this problem, but I have to admit that my skills are very limited.

I appreciate any input from more experienced users.

Thanks,

Lutz

1 REPLY 1

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!

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.

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