Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
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
MVP
MVP

Hi,

Did you tried with fabs()

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

teiswamsler
Partner - Creator III
Partner - Creator III

Hi Arne

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

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


/Teis