
Contributor
2019-11-20
01:52 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
619 Views
3 Replies


Creator III
2019-11-20
04:00 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The expression looks correct. How does your data model look like and which dimensions are you using in your chart?
595 Views

Partner - Master
2019-11-20
04:16 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
587 Views

Contributor II
2019-11-20
04:42 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
580 Views
