Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How do I Limit the months displayed in a graph

Hi There,

I was wondering if someone could help me.

I have a graph which displays sales for the previous year (2012) in one bar, and sales for the current year (2013) in another bar. The two bars are side by side.

The dimension for the graph is 'month'. The graph displays the months Jan to Dec.

I would like to limit the graph so that it only displays the 2013 months that have sales.

(ie) I want the graph to display Jan - May only.

Dose anyone know how I limit this in the expression of the graph?

I have an example in the attachment which displays the grah, and I would like to know how to get it only to display Jan - May,

I would really appriciate some help with it.

Thanks,

1 Reply
Not applicable
Author

in your script write this code

Year(date(datefield)) as year

num(month(date(datefield))) as monthnum

month(date(datefield)) as month


then

take a coditional Dimension like this

if(year=2013 and monthnum>=1 and monthnum<=5,month)