Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
n1ef5ng1
Creator
Creator

absolute value

Hi guys,

i have a bunch of values in a field with negative value

is there any command that I can use to remove the negative value aka absolute value.

I tried fabs(value) but the result turns out a different value.

any help is appreciated

5 Replies
Gysbert_Wassenaar

You're probably not using the same definition of 'absolute value' as the rest of the world, but fabs(myvalue) returns the absolute value of myvalue. If you want disregard negative values you can use an if statement: if(myvalue>=0,myvalue).


talk is cheap, supply exceeds demand
kumarnatarajan
Partner - Specialist
Partner - Specialist

Hi,

fabs() is currect one. Ok try this one

Ex: if(Left(value,1)='-',-1,1)*value

n1ef5ng1
Creator
Creator
Author

the value turns out to be the same as i use fab.

absolute to my understanding is to change ur negative value (-200) to positive ( 200)

anyway my value is in minutes form, say 200 refers to 200 minutes, it that the reason why it turns out my value to be all in decimal point?

kumarnatarajan
Partner - Specialist
Partner - Specialist

Hi,

Yes, minutes are come decimal point value in qlikview. Read the Date() and Time() Functions.

Refer This Blog

www.qlikviewaddict.com

n1ef5ng1
Creator
Creator
Author

is there any way i can solve this? without changing here and there