Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

n1ef5ng1
Contributor

today - 4 of last year? how?

Hi guys,

I have this code

=round((sum({<Month_Id={"$(=max({<Month=>} Month_Id))"},Date ={'<=$(=Date(today()-4))'}>} TEU

This code will find the value(TEU) of current month on today - 4. Example saying today is 17th of feb, it will find the value on 13th of feb 2014

Now I would want to find 13th of feb 2013 so that I am able to find whether is it growth or decline in year on year comparison.

is there anyway that i am able to code? thanks

2 Replies
AlbertoV
Contributor III

Re: today - 4 of last year? how?

you could use AddMonths(today()-4,-12)

MVP
MVP

Re: today - 4 of last year? how?

Hi,


Try like this

=round((sum({<YearDimensionName=, QuarterDimensionName=, Month_Id={"$(=max({<Month=>} Month_Id))"},Date ={'<=$(=Date(AddMonths(today()-4, -12)))'}>} TEU)


Exclude the current selections by giving YearDimensionName=, QuarterDimensionName= in set analysis expression, replace this with your columns.

Hope this helps you.


Regards,

Jagan.

Community Browser