Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

rebelfox
Contributor

Line Chart With X Axis Scroll Start Point

I have a line chart with an X-Axis Dimension of Year-Month.

I have set the chart to show only 12 months at a time but the chart has a scrollable X-Axis so a user can select any 12 months

over a number of years.

Is it possible to define which 12 months are shown on the X Axis?

Ideally I would like it to show the current month as the latest visible ( on the far right ).

I can't find anything to indicate how to set the start display point ( on the left hand side of the chart ) on the X-Axis to current month -12.

All advice appreciated.

3 Replies
MVP & Luminary
MVP & Luminary

Re: Line Chart With X Axis Scroll Start Point

Yes, that's possible. You can use the Static Min and Static Max settings of the dimension axis. Or you can use a calculated dimension that uses an expression to return only the last 12 months. Or you can change the chart expressions so they only calculate results over the last 12 months. Have a look at the results returned by this search:

https://community.qlik.com/search.jspa?q=show+last+12+months

You should be able to find examples of all the options. Pick one that matches your requirements best.


talk is cheap, supply exceeds demand
rebelfox
Contributor

Re: Line Chart With X Axis Scroll Start Point

Looking at the returned list you suggested I notice they all reference showing a fixed number of columns on the x-axis to show just the last 12 months.  I want to show the last 12 months but still have the scroll bar option to scroll backwards in time.   I think the static values limit the number of columns on the chart rather than set the start columns with a scrollable chart.

MVP & Luminary
MVP & Luminary

Re: Line Chart With X Axis Scroll Start Point

Then search for the macro to set the scroll bar to the right side of the axis.


talk is cheap, supply exceeds demand