0 Replies Latest reply: Jan 26, 2018 11:46 AM by Aaron Dhobi RSS

    set analysis query for average of previous month

    Aaron Dhobi

      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