Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hallo Qlik Community ,
I have the following problem:
I have a pivot table that shows me the different prices for different products - min, max and mode. I also have added a graphic that shows the prices through a timeline(the date of the Invoice).
The problem appears when there are for the same products two different Invoices with different unit prices.
Example:
first bill we acquired 1 unit for the price of 1000$. Second bill we acquired 6 units for the unit price of 500$.
The graphic gives me for that day a price of 666,67 Euros - i guess 4000 $/6 and not 4000$/7. The pivot table shows me a min price of 333,333$ half of the 666,67 $.
My formula:
Min(If((Cost / units) > 0, Cost/ Unitsl)).
I tryed this other formula and i got now for Min price 1000$
Min(Aggr(If((Cost/ Units) > 0, Cost/ units),Invoice date))
Is there a solution for this problem?
Thank you for the help
Carlos
Hi - rather than we assuming the data based on your provided one line data, could you pls help up with some sample data and expected output?
What's the if() about? Why not just use e.g.
Min(Cost / units)?
Note that this will return the minimum for a single invoice line. If you're looking for the daily minimum, you'd want to use aggr():
Min(Aggr(Sum(Cost/ units),[Invoice date])))