Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi i have the following expression in my Qv Doc.
=num(sum({$<FY = {$(=max(FY))}, Year=,Quarter=, YearMonth = {"<=$(=max(YearMonth))"},Month= >} Nettobelopp), '$#,##0;($#,##0)')
i would like to find the values - 1 year to measure against.
my syntax however seems wrong,
any help is greatly appreciated.
=num(sum({$<FY = {$(=max(FY)-1)}, Year=,Quarter=, YearMonth = {"<=$(=max(YearMonth))"},Month= >} Nettobelopp), '$#,##0;($#,##0)')
You can also try this with the month number,
=sum({$<Year=, Year={$(=max(Year)-1)},MonthNumber={$(=max(MonthNumber))}>}Nettobelopp)
Regards,
Nirav Bhimani
Hi,
The calculation for the FY is OK, the problem is that you are also calculating the YearMonth. You will need to perform a calculcation that returns the correct YearMonth that you want for last year.
Regards,
Stephen
Stephen Redmond is author of QlikView for Developer's Cookbook
He is CTO of CapricornVentis a QlikView Elite Partner. We are always looking for the right people to join our team.
Follow me on Twitter: @stephencredmond
Try this,
Last Year:
Num(Sum({<FY = {"$(=Max(FY)-1)"}, Quarter=,Year=, Month= >} Nettobelopp) , '$#,##0;($#,##0)')
Last Year Month i.e July-2012
=Sum({<Year=, MonthYear=, Month=, Quarter=, CalDate={'>=$(=MonthStart(Max(CalDate), -12))<=$(=MonthEnd(Max(CalDate), -12))'}>} Nettobelopp)
Regards,
Nirav Bhimani
You can also try this with the month number,
=sum({$<Year=, Year={$(=max(Year)-1)},MonthNumber={$(=max(MonthNumber))}>}Nettobelopp)
Regards,
Nirav Bhimani