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

Announcements
ALERT: QlikView server communication interruptions following Microsoft Windows Domain Controller security updates
cancel
Showing results for 
Search instead for 
Did you mean: 
andrea90casa
Creator
Creator

First Price Calculation

Hi at all,

I have this situation

So i have several products and the date of purchase and the relative unit price.

I created a field called "Prima data" where i select, for each product, the first date of purchased and then i would like to obtain, for each product, the price of purchased at the first date. The problem is that in the last column i used this formula

aggr(nodistinct avg({<data={"$(MinData)"}>}Unit_Price), Product)

but it calc the unit price only for the first date of the entire data set (in this example was product A purchased at 01/01/2017 at 1,1).

Is there any solution in order to calc the first price for each product?

Andrea

Labels (1)
10 Replies
antoniotiman
Master III
Master III

You can

Aggr(NODISTINCT FirstSortedValue(DISTINCT Unit_Price,data),Product) *Quantity

Last Price -> replace data with -data