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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
User12321
Contributor III
Contributor III

Help with Set Analysis

Hello,

I have 2 fields, Account and Amount.

I want to sum up the value in the amount field such that

1. If the value is negative, I need to convert it to positive first before summing up.

2. I only need to sum up for Account with value = 4000.

Any suggestion please.

Thank you!

Labels (1)
2 Solutions

Accepted Solutions
agigliotti
MVP
MVP

Hi @User12321 ,

Maybe this:

Sum( {< Account = {'4000'} >} if(Amount <0,Amount*-1,Amount) )

I hope it can help.

Best Regards

Andrea

 

The Power of shining a light on the dark side of your data.
Follow me on my LinkedIn | Know Gamma Informatica at gammainformatica.it

View solution in original post

marcus_sommer
MVP
MVP

Try it with: Sum({<Account={'4000'}>} fabs(Amount))

- Marcus

View solution in original post

2 Replies
agigliotti
MVP
MVP

Hi @User12321 ,

Maybe this:

Sum( {< Account = {'4000'} >} if(Amount <0,Amount*-1,Amount) )

I hope it can help.

Best Regards

Andrea

 

The Power of shining a light on the dark side of your data.
Follow me on my LinkedIn | Know Gamma Informatica at gammainformatica.it
marcus_sommer
MVP
MVP

Try it with: Sum({<Account={'4000'}>} fabs(Amount))

- Marcus