Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
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
Partner - Champion
Partner - Champion

Hi @User12321 ,

Maybe this:

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

I hope it can help.

Best Regards

Andrea

 

View solution in original post

marcus_sommer

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

- Marcus

View solution in original post

2 Replies
agigliotti
Partner - Champion
Partner - Champion

Hi @User12321 ,

Maybe this:

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

I hope it can help.

Best Regards

Andrea

 

marcus_sommer

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

- Marcus