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

Announcements
Discover how organizations are unlocking new revenue streams: Watch here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Line graph – how to simplify dimension label to show month rather than day (whilst maintaining a data value for each day).

Hi all.

My line chart shows the number of distinct records (expression) per day (dimension).

The dimension label is very busy as there are hundreds of values – to simplify things I would rather show just the month and year, having just one label per month in the format ‘Aug 2011’.

If I change the dimension to MonthName(DateField) then I get the correct label but only one data point per month, which is wrong as I don’t want a count distinct for the month - it is important that there is one data point per day.

Thanks in advance.

Michael.

3 Replies
stephencredmond
Partner - Specialist II
Partner - Specialist II

Hi,

You can't with a line chart but you can with a Bar chart.

Add dimensions for Month and Day (in that order).  In the dimension for Day, deselect the "Show Legend" option.

Add a 2nd, dummy expression, with just the value 0.

On the presentation tab, turn off the "Show Legend" check box.

You get something like this:

chart_image.jpg

Stephen

swuehl
MVP
MVP

I would suggest that you create your MonthName field in the script as additional field (this is better performing).

Then in you chart, use your new field as dimension and advanced aggregation in your expression:

= sum(aggr( count(distinct RECORD), DateField))

swuehl
MVP
MVP

Reading Stephen's post, maybe I have misunderstood your problem.

If it's all about the labelling, you could keep the Date as dimensions and try working with a continuous axis, like attached.

Regards,

Stefan