Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Line Chart, last x month from today with Set Analysis

Hi,

i have a line chart with 01/2005 - 04/2009 as dimension and I would like to display only the last x month from today e.g 05/2008 - 04/2009).
Can anyone help me how the set analysis statement should look like
or does it make more sense to implement this without set analysis.
Thanks

6 Replies
sparur
Specialist II
Specialist II

Hi, Aloah

Look at the my post (and QV doc there :))

http://community.qlik.com/forums/p/16255/63349.aspx#63349

Not applicable
Author

Hi,
sorry I'm a newbie. Am I right that your example refers to the selected date. I'm trying to get a line chart that always shows the last x month from today. No matter what's selected.

sparur
Specialist II
Specialist II

Try that:

in expression of chart change expression to:

sum({<MonthYear = {"$(='<='&date(monthStart(Today()), 'MMM-YYYY')&'>'&date(addmonths(date(monthStart(Today())), -12), 'MMM-YYYY'))"}>} Amount)

clear all selections and you will get only X month from today. where X=12.

sparur
Specialist II
Specialist II

see in my attachment... (sheetname "Prev X month from today()")

Not applicable
Author

thanks sparur. Exactly what I was looking for.

sparur
Specialist II
Specialist II

I was glad to help Smile