Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
n1ef5ng1
Creator
Creator

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
albertovarela
Partner - Specialist
Partner - Specialist

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

jagan
Luminary Alumni
Luminary Alumni

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.