Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

aaronnayan
Contributor

set analysis query for average of previous month

Hi guys i have a complex expression but its not give me the average for the last month for some reason

Could you help?

If (Month(today())=1 And Month(today())<4,Avg({<[Financial Year]={"$(=year(today())-1)"},Month={"=Date(Floor(MonthEnd(today(),-1)),'MMM')"}>}[M Working Hours]),
Avg({<[Financial Year]={"$(=year(today()))"},Month={"=Date(Floor(MonthEnd(today(),-1)),'MMM')"}>}[M Working Hours]))



For example the above should give me the average of  the month Decembers [M Working Hours] right?



Thanks guys

Community Browser