Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I want to show data like if i click 2013 year in list box, straight table will be shown 2013,2012,2011,2010 years data with Revenue metric
Please let me get solution for this Requirement
Thanks in Advance
Nihhal
Please see the attached sample.
Expression like:
sum({<Year = {">=$(=(Max(Year), -3))<=$(=(Max(Year)))"}>}Sale)
HI Nihhal L,
I had a similar inquiry earlier, please find there the best answer with a brilliant solution:
http://community.qlik.com/thread/35870
With similar logic, you can flag years if you do not want to display exact 48 months.
Let us know how it goes.
Best wishes,
Thank you for reply Kadir i want yera wise suppose i have only year dimension like 2008,09,10,11,12.....
Hi Nihhal L,
You may wish to try:
sum({<Year ={">=$(=Date(AddYears(Date#(max(Year),'YYYY'),-4),'YYYY')) <=$(=Date(AddYears(Date#(max(Year),'YYYY'),0),'YYYY'))"} >} Sales)
in your expression.
What this does is, it finds the maximum year and sets range from now until 4 years back.
In some occasions, you may wish to limit your data to last year's end. In that case, set it like:
sum({<Year ={">=$(=Date(AddYears(Date#(max(Year),'YYYY'),-4),'YYYY')) <=$(=Date(AddYears(Date#(max(Year),'YYYY'),-1),'YYYY'))"} >} Sales)
Changes were indicated in red font for your convenience.
Hope that helps. Let us know how it goes.
Best wishes,
Please see the attached sample.
Expression like:
sum({<Year = {">=$(=(Max(Year), -3))<=$(=(Max(Year)))"}>}Sale)
Thank You tresesco.
NiHhal.