Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
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
Highlighted
Master II
Master II

Re: Minimum value across a date range

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

Re: Minimum value across a date range

May be try using 'Total' like:

MIN(total <purchase_date> price)
Highlighted

Re: Minimum value across a date range

Try one of these

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

or this

Min(TOTAL <item_code, purchase_date> price)