Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

MAX of Sum IF expression

Hi all,

I'm new to QV and I'm trying to figure out how to write an expression calculating the the maximum of a SUMIF expression, without any luck.

For a certain range of dates I need to present the three largest positive and negative values (gross sent and gross received).

For instance, I would like to choose a month and then present the three largest daily sums. I guess what Im lookin for is some kind of aggregated function but I can't seem to get it right.

Any ideas?

Pls see examples attached.

Kind Regards,

Olle  

1 Solution

Accepted Solutions
Not applicable
Author

8 Replies
Not applicable
Author

Hi Olle,

check my example

Not applicable
Author

Thank you for your answer Dariusz,

however. My problem is that I first need to summarize the negative and positive values (separately) for each date selected. As per below:

SUM(IF(TransactionAmount<0,TransactionAmount))

SUM(IF(TransactionAmount>0,TransactionAmount))

After this is done, I need present the three largest/smallest sums.

Thanks in advance,

Olle

Not applicable
Author

try this:

Not applicable
Author

Perfect.

Thanks a lot for your help Dariusz!

Regards,

Olle

Not applicable
Author

Hi again,

Im pretty sure it worked just fine at first.

Then something happened, now when I open the qvf-file you attached above the min column always shows the same value as rank 1 & 2. Do you know what might have happened? I even restarted my computer and then downloaded the file from here again.

Pls find attached.

Rgds,

Olle

Not applicable
Author

I opened your attachment and i can see:

Not applicable
Author

Ok, must be something with my local settings.

Thanks!

Not applicable
Author

Strange ....

Check again and let me know