Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Count if Sum(x)> 5000

Hi,

I am trying to write an expression where I want to calculate the number of distinct PO's with Line Amount less than or equal to $5000.

I believe I need to Aggregate the [Line Amount] spend by [PO Number] to list all such PO's in straight table.

I'd appreciate if I could get the best method/syntax to produce this result?

Thank you in advance.

16 Replies
MarcoWedel

Hi,

your Total Amount for POs having Line Amounts between 5000 and 10000 could be:

QlikCommunity_Thread_132436_Pic10.JPG.jpg

=Sum(If(Aggr(Sum([Line Amount]), [PO Number])>5000 and Aggr(Sum([Line Amount]), [PO Number])<=10000,Aggr(Sum([Line Amount]), [PO Number])))

QlikCommunity_Thread_132436_Pic9.JPG.jpg

hope this helps

regards

Marco

Not applicable
Author

Marco,

Thank you for the response. Could you kindly share the .qvw for this?

Appreciate your help!

Regards,

Deep

MarcoWedel

Hi,

qvw is already attached to my previous post.

regards

Marco

simenkg
Specialist
Specialist

=Count({<[PO Number]={"=sum([Line Amount])<5000"}>}Distinct [PO Number])

Not applicable
Author

Marco,

Thank you!

This worked perfectly!

Appreciate your help!

Regards,

Deep

MarcoWedel

You're welcome

Regards

Marco

Anonymous
Not applicable
Author

Hello Jonathan,

It was very useful.

thanks