Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi,
i have a requirement that i need to get sum of sales that are sold on max date among the existing sold date.
i tried with the expression "sum({$<YEAR = {$(=max(YEAR))}, MONTH = {$(=max(MONTH))}>} Sold_Date) "
but not giving me any result.
can anybody suggest me where i am wrong ?
Thanks
Charitha
In such case, a sample qvw would help get fastest resolution. Among many possiblities, one issue could be: Max() returning numeric value while you have months like Jan, Feb..
Hi,
please use always this link when building set analysis statements...
Set Analysis Wizard for QlikView | qlikblog.at
I think it should help you...
Regards
André Gomes
go for
firstsortedvalue(sales,-max date) , instead of max date use ur field like ,date ,max date .....
u will get top max value
sum({1< DateField= {'=$(vMaxDate)'} >} SalesAmount )
with the variable vMaxDate: " =Date(Max({1}DateField)) "
should do the trick
Hi Lakshmi,
if you have date field in your script then you can directly use
sum({$<SoldDate={$(=max(SoldDate))}>}sales)
if you want always to calculate max of select date, by disregarding selection you can use
sum({1<SoldDate={$(=max(SoldDate))}>}sales)
With Regards
Harshita Gaur
Hi lakshmi ,
did u tried my one
firstsortedvalue(sales,-max date) , instead of max date use ur field like ,date ,max date ,sold date which u have ...
u will get top max value