In case you missed the announcement: The Alteryx One Fall Release is here! Learn more about the new features and capabilities here
ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests Early 2026. Make sure to check your account preferences in my.alteryx.com to make sure you have filled out your security questions. Learn more here
Start Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.

Absolute Value of Data in SQL Statement

abbymajercik
5 - Atom

I am looking to get the Absolute value of data before it is summarized through an SQL statement. I am trying to do this through a PRE SQL Statement as once I summarize the data through SQL the absolute value is the Absolute value of the summarized data. I am having problems with the Pre SQL Statement and unsure how to write that statement. Please let me know how to resolve this. 

1 REPLY 1
apathetichell
20 - Arcturus

Hi. I'm not 100% sure what you are looking for. If you want to do an absolute value before a summarize tool using in db - most DB's have a function you could use in a formula tool in-db like ABS("fieldname") and then you could use a summarize tool in-db after.

 

Likewise - you should be able to create a new column and then sum it something like

 

select sum(absolute_value_column) from (select ABS(my_column) as absolute_value_column from my_database)

 

specific SQL can vary.

Labels
Top Solution Authors