Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
sculptorlv
Creator III
Creator III

Negative numbers to positive

Hello, I guess the quastion is very simple, I am just looking for corresponding function.

I have one columns with such results:

Value

+1

+2

-4

-5

+6

-6

How can I make a SUM of all number with excaption, that all numbers are positive?

1 + 2 +4 + 5 +6 + 6

Something like SUM (MODULE(Value)) - where Module is unknown function to me...

Thank you in advance.

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Try

=Sum(Fabs(Value))

View solution in original post

7 Replies
swuehl
MVP
MVP

Try

=Sum(Fabs(Value))

maxgro
MVP
MVP

maybe fabs, this is a copy from the qlik help

fabs(x)

The absolute value of x. The result is a positive number.

Examples:

fabs( 2.4 ) returns 2.4

fabs( -3.8 ) returns 3.8

Chanty4u
MVP
MVP

=

sum(fabs(value))

or

fabs(sum(value))

avinashelite

use the fabs() function

fabs(your_expression)

sculptorlv
Creator III
Creator III
Author

Thanks to all of you!

Kushal_Chawda

Go with fabs function

=sum(fabs(Value))

or

sum(if(Value< 0, Value*-1,Value))

engishfaque
Specialist III
Specialist III

Dear Ruslans,

Here is a small description from QlikView Help regarding fabs function.

fabs(x): The result is a positive number.

Examples:

fabs( 2.4 ) returns 2.4

fabs( -3.8 ) returns 3.8

Use listed below expression for your scenario.

=Sum(fabs(Value))

Kind regards,

Ishfaque Ahmed