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

Announcements
Only at Qlik Connect! Guest keynote Jesse Cole shares his secrets for daring to be different. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

X axis step in Bar Chart

Hi All,

I have a bar chart with sales on y axis and month-year(Jan 2013, Feb 2013 etc) on x axis. I want to show axis labels for every 6 months instead of every month such as Jan 2013, June 2013 etc. How do I do this? Also, how can I show the x axis labels slant instead of horizontal. Thanks in advance for helping out.

1 Solution

Accepted Solutions
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Try =date(monthstart(ReportingDate), 'MMM YY')


talk is cheap, supply exceeds demand

View solution in original post

6 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

You can try setting the Dimension Axis to Continuous with 181 as Static Step value. Next on the Number tab select the Continuous X-axis and choose Date under Number Format Settings and use MMM YYYY as format string.

For slanted text you can select the middle radio button for the Primary Dimension labels (just below the '/' symbol ).


talk is cheap, supply exceeds demand
Not applicable
Author

Thanks Gysbert, when I select the continuous option, it is complaining "no numeric data on x axis". Can you please advise?

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Ah, your months are strings, not dates formatted as months. Try creating dates from the strings in the script first:

date(date#(MyMonthField, 'MMM YYYY'), 'MMM YYYY') as MyMonthField


talk is cheap, supply exceeds demand
Not applicable
Author

Sorry I accidentally marked it a answer, I have 3 fields in my data set. Reporting Date, Reporting Month(numeric), Reporting Month(text), Reporting Year. I am using Reporting Month(text) and Year to show in the axis in my Chart. What expression should I use? Thanks again!!

Not applicable
Author

I used the expression =date(ReportingDate, 'MMM YY') but it is showing numerous bars in the chart. I only have 3 years worth of data so I should'be be seeing more than 36 bars. Any thoughts?

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Try =date(monthstart(ReportingDate), 'MMM YY')


talk is cheap, supply exceeds demand