Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

guptanupur
New Contributor II

how to show the sum(amount) with positive and negative value in absolute term ?

Hi ,


how to show the sum(amount) with positive and negative value in absolute term ? while changing by using fab or any other set analysis the sum(amount) is giving me wrong values ..... how can we achieve this in qlik sense ?

5 Replies
siddharth_s3
Contributor

Re: how to show the sum(amount) with positive and negative value in absolute term ?

Give an example. I don't get your need exactly.

YoussefBelloum
Esteemed Contributor

Re: how to show the sum(amount) with positive and negative value in absolute term ?

guptanupur
New Contributor II

Re: how to show the sum(amount) with positive and negative value in absolute term ?

now suppose i have amount as -100, 100 , 20,-80  if I give sum of these amount it will be -60 and in my chart it will show as -60 ....but I want to show the abs value in my chart as 60

I used fabs(sum(amount)) it is giving me value as 300 (which is not correct)

is there any other expression or formula to get absolute 60 .??

ogautier62
Valued Contributor II

Re: how to show the sum(amount) with positive and negative value in absolute term ?

Hi,

you must tell :

fabs(sum(total <your break> amount)

if not, it's done for each row

regards

devyanshu_gupta
New Contributor III

Re: how to show the sum(amount) with positive and negative value in absolute term ?

If fabs is giving the wrong result try using "SIGN" function

Try

=Sum(Amount)*Sign(Sum(Amount))