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: 
sudeep78
Contributor II
Contributor II

Minimum value across a date range

Hello,

I am a new Qlik Sense user and am looking for a solution for the problem listed below.

I have a set of data comprising Purchase_Date, Item_Code, Invoice_Number and Price. The same item has multiple prices on the same date (against different invoice numbers).

I want to find the difference between the price listed in each invoice and the minimum price on that day. I tried to use the expression AGGR(MIN(price),item_code, purchase_date). This returns the value against the row having the lowest value. However it does not give any value in the other rows and hence I am unable to proceed further. Using RANGEMIN function also gave me a similar result.

I guess there's a simple solution; however its eluding me and I have not had any luck in finding it in the forum. Grateful for any help in this regard.

Thank you in advance,

Sudeep  

3 Replies
pradosh_thakur
Master II
Master II

Price - min(Total <[Purchase_Date]>Price)
Learning never stops.
tresesco
MVP
MVP

May be try using 'Total' like:

MIN(total <purchase_date> price)
sunny_talwar

Try one of these

Aggr(NODISTINCT Min(price), item_code, purchase_date)

or this

Min(TOTAL <item_code, purchase_date> price)