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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Jolly
Contributor
Contributor

Unable to find the minimum value of aggregated sum calculation

Hi All,

 

I have a scenario where i have to find the sum of unit price for numbers of products and after that i need to find the minimum between those unit prices with respect to product category.  I am trying the below formula, but result is not coming. Could anyone please help me out on this.

Min(aggr(sum([invoice.invoiced_amount]/[invoice.invoice_qty]), [product.product_category]))

Unit price - sum([invoice.invoiced_amount]/[invoice.invoice_qty])

where invoice.invoiced_amount is the amount of a particular product category and invoice_qty is quantity of that product.

3 Replies
vunguyenq89
Creator III
Creator III

The expression looks correct. How does your data model look like and which dimensions are you using in your chart?

JordyWegman
Partner - Master
Partner - Master

Hi Jolly,

What if you try:

Min(aggr(sum([invoice.invoiced_amount])/ Sum([invoice.invoice_qty]), [product.product_category]))

Unit price - sum([invoice.invoiced_amount]) /Sum([invoice.invoice_qty])

Jordy

Climber 

Work smarter, not harder
Chirag2397
Contributor II
Contributor II

Hi @Jolly ,

Please try this

min([invoice.invoiced_amount]/[invoice.invoice_qty]).