Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

Not applicable

Current Date minus 13 month

Hello -

I am struggling with writing an expression that would display current month (as a default selection) and then the formula would need also subtract 13 month.

My Dimensions are:

  • Time_Period (2014-01, 2014-02 etc)
  • Measure: Sales 

Please help!

Thank you

Tags (1)
2 Replies
jaimeaguilar
Valued Contributor II

Re: Current Date minus 13 month

Hi,

you'll have to adapt to your dimensions but it could be something like this:

sum({$<MonthYear = {'$(=Monthname(today(), -13))'}>}Sales)

besides you'll need to ignore in set analysis any time field that could interfere in the calculation (specially if these fields are visible to end users) like: date=, month=, year=, week=, quarter= and so on

regards

Re: Current Date minus 13 month

=SUM({<MonthYear = {">=$(=Date(AddMonths(Date#(Max(MonthYear),'YYYY-MM'),-13),'YYYY-MM'))<=$(=Date#(Max(MonthYear),'YYYY-MM'))"}>}Sales)

Community Browser