BookmarkSubscribeRSS Feed
aczech2001
Calcite | Level 5

Dear SAS users,

I am a total dummy when it comes to using SAS. Thus, I apologise for totally non-challenging questions.

 

I would like to create an absolute value for the difference of measurements for required value (speed).

 

Please, could you advice how to do it using:

- 'Tasks and Utilities' tabs

- The code

 

Thank you so much for your kind help!

 

Agnieszka

7 REPLIES 7
PaigeMiller
Diamond | Level 26

Can you show us some sample data, and the expected results?

--
Paige Miller
RW9
Diamond | Level 26 RW9
Diamond | Level 26

In terms of code you would use the abs() function:

http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a000245861.htm

 

I have no idea what "Tasks and Utilities" is, what software?

aczech2001
Calcite | Level 5

Hi. Thank you for answering my question.

'Tasks and Utilities' is the drop down list for different SAS functions on the left hand side of the screen. Thanks

Reeza
Super User

Tasks and Utilities is the name for the GUI tools in SAS Studio.

 


@RW9 wrote:

 

 

I have no idea what "Tasks and Utilities" is, what software?


 

Reeza
Super User

This would depend on your data structure a lot.

 

If the variables are in the same line it's one way, and if they're in different lines you need a different approach. 

 

Have you checked out the tutorial video's here or taken the free e-course? It would help you answer a lot of these questions.

 

https://video.sas.com/detail/videos/sas-analytics-u/video/4573023399001/creating-a-new-column-in-sas...

 


@aczech2001 wrote:

Dear SAS users,

I am a total dummy when it comes to using SAS. Thus, I apologise for totally non-challenging questions.

 

I would like to create an absolute value for the difference of measurements for required value (speed).

 

Please, could you advice how to do it using:

- 'Tasks and Utilities' tabs

- The code

 

Thank you so much for your kind help!

 

Agnieszka


 

 

 

 

 

aczech2001
Calcite | Level 5

Hi to all,

Thank you for trying to help out with this task.

 

Please, see the data attached.

 

I was looking to find an absolute value from the difference for levels of Pain 1 and 2,  calculated by subtracting Pain1 values from Pain 2 values for each individual.

 

Thank you

Reeza
Super User
ABS() is the function to return the absolute value of a number. Combined with the video above, you should have enough information to make an attempt to solve your problem. If you still are not getting your desired results please post your code or a snapshot of your task.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 7 replies
  • 1089 views
  • 0 likes
  • 4 in conversation