Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Highlighted
supriyabiware
Contributor

Set Analysis for 'best of' calculation

Hi All,

Can someone help me writing a set analysis formula for Best of Calculation?

e.g. = Supplier 1 - sells Product 1 for 10 €

          Supplier 2 - sells Product 1 for 15 €

          Supplier 3 - sells Product 1 for 12 €...... i have this data for many products many suppliers.

i want to calculate sum(selling price) for Product 1 - but selling price should include #Best of Bid# .. in above case sum(selling price)=10€ for Product 1

This formula would be applied on chart Supplier Vs Selling price (For specific Product - which is listbox filter)

I understand that it should be min(selling price forEach Product) - but i am not sure of set analysis formula here.

Thanks

Supriya

1 Solution

Accepted Solutions
MVP
MVP

Re: Set Analysis for 'best of' calculation

May be this?

Sum(Aggr(Min(ProductPrice),Product))

If this doesn't help, try to share your sample qvw.

5 Replies
Khan_Mohammed
Honored Contributor II

Re: Set Analysis for 'best of' calculation

=Sum({<Product_Price= {"$(=Min(Product_Price))"}>}Product_Price)

this would give you minimum price of the product

Not sure if above one is correct?

Can you post a sample data?    

supriyabiware
Contributor

Re: Set Analysis for 'best of' calculation

Hello Aehman,

Something like sum(minimum of Product Price in one Product)

1. when i select one product the text box should show min price whereas the chart (supplier vs price) should show the minimum price for each supplier.

2. when no product is selected text box should show sum(minimum of Product Price in one Product) and chart(supplier vs price) should show all suppliers with minimum price for each product

catch here is - multiple suppliers have same price chart wants to display all, but text box should pick one min value.

Thanks

Supriya

MVP
MVP

Re: Set Analysis for 'best of' calculation

May be this?

Sum(Aggr(Min(ProductPrice),Product))

If this doesn't help, try to share your sample qvw.

Re: Set Analysis for 'best of' calculation

try below

Sum(Aggr(Min(ProductPrice),Product,Supplier))

supriyabiware
Contributor

Re: Set Analysis for 'best of' calculation

Thanks this worked perfect! i guess i was thinking something complex because of the requirement