3 Replies Latest reply: Feb 12, 2018 10:25 PM by Thiago Justen Teixeira

# Get Qty From Max Date

Hello All,

I have some question expression in Qlik Sense,

From attached table, I wanna get Qty from last stock (last date).

I'm using this formula in QlikView :

sum({<Date_Fix={'\$(=max({<DESC={'STOCK'}>}Date_Fix))'}>}qty_stock)

Expression is no problem in QlikView (although still visible red line, maybe error) , until I copied to Qlik Sense.

Expression doesn't work in qlik sense, no value from formula.

Anyone can help me..?

Thanks

 Date_Fix qty_Stock DESC 1/15/2018 7 STOCK 1/16/2018 3 STOCK 1/17/2018 6 STOCK 1/18/2018 6 STOCK 1/19/2018 3 STOCK 1/20/2018 9 STOCK 1/21/2018 2 STOCK 1/22/2018 8 STOCK 1/23/2018 2 STOCK 1/24/2018 7 STOCK 1/25/2018 0 STOCK 1/26/2018 2 STOCK 1/27/2018 5 STOCK 1/28/2018 8 STOCK 1/29/2018 9 STOCK 1/30/2018 2 STOCK 1/31/2018 6 STOCK 2/1/2018 7 STOCK 2/2/2018 8 STOCK 2/3/2018 3 STOCK 2/4/2018 5 STOCK 2/5/2018 6 STOCK 2/6/2018 8 STOCK 2/7/2018 5 STOCK 2/8/2018 7 STOCK 2/9/2018 2 STOCK
• ###### Re: Get Qty From Max Date

Check this out:

sum({<Date_Fix={"\$(=max({<DESC={'STOCK'}>}Date_Fix))"}>}qty_stock)

Double quotes will make difference here.

• ###### Re: Get Qty From Max Date

Thank you Thiago, it's worked for me..!!

Do you can explain, when we must use single quotes or double quotes in expressions?