Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Qlik® Product Spotlight: Discover what’s possible. Get more from our products.
See for yourself. Register today.
Not applicable

absolute sum of positive and negative values in table

Hi

I have under #totalvalue the amountXprice, but this is negative for BUY and POSITIVE for sell

How can I formulate the TOTAL of #totalvalue in absolute terms (not adding the plus and minus from buy/sell)??


The below formula yiels the wrong result since it adds the buy and sell totalvalue, not the absolute numbers.

Sum({<TransactionCategory = {'Equities'}>} #TotalValue)

qliks1.JPG

qliks2.JPG

2 Replies
Chanty4u
Esteemed Contributor III

Re: absolute sum of positive and negative values in table

Hi,

Did you tried with fabs()

fabs(Sum({<TransactionCategory = {'Equities'}>} #TotalValue))

teiswamsler
Contributor II

Re: absolute sum of positive and negative values in table

Hi Arne

When using fabs u need to turn value before sum()

Sum({<TransactionCategory = {'Equities'}>} fabs(#TotalValue) )


/Teis