Skip to main content
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: 
Not applicable

Show last 6 months

Hi all,

in my app i have a chart that displays sales (y) over months (x).

Since my source data delivers data for the last 5 years, i only want to present the last 6 months on the x axis like this:

- No selection in my calendar displayes the last six months from today on (where today is part of those six months; means: no selection, i see Nov, Oct, Sept, Aug, Jul, Jun)

- If i select a year in the calendar (but no month) i want to see the last six months of the selected year (Jul to Dec)

- if i have a month and a year selected in my calendar i want to see the last six months from the selected year / month on. E.g.: Year = 2077, Month = Apr, then my x axis shows Nov 06, Dec 06, Jan 07, Feb 07, Mar 07, Apr 07

- If i have no year but just a month selected, the it shows me the last six months for the current year from the selected month on.

Please see attached little qvd as a source file.

Thanks a lot!

1 Solution

Accepted Solutions
lironbaram
Partner - Master III
Partner - Master III

hei attach is an example

i add a field monthyear which hold the monthstart date for each date

then you can easyly use the addmonths function

hope it helps you

View solution in original post

2 Replies
lironbaram
Partner - Master III
Partner - Master III

hei attach is an example

i add a field monthyear which hold the monthstart date for each date

then you can easyly use the addmonths function

hope it helps you

Not applicable
Author

Hello

I am facing a simlar issue. I have a field called as month sequence and I am trying to subtract 5 from it. Could you please explaing the significance of the following in formula

{<Year=, Month=,) 

Why do we need to specify these? I have also observed if we remove them then it does not work.

Thanks