8 Replies Latest reply: May 16, 2012 2:49 AM by Soulessfreedom

# Dynamic placement of Text in Chart

Hi All, I have some date as my x-axis and I need to group them by their year and use each of the group years as heading of the particular section. I managed to create the text in chart, but as the selection of data changes, the year will not be the same. Hence, I need some solution on how to place the text in the chart dynamically. Below is a picture to show what I have done so far. It is not possible to use 2 level of dimension as I am calculating moving average. (Once i use 2 level of dimension; e.g year and period, the graph will be very funny.) This is quite a hard problem and I cannot find any solution in the discussion forum so far. Hope to hear from you guys soon.

Thanks and regards,

soulessfreedom

• ###### Dynamic placement of Text in Chart

So you want several pieces of text in the chart giving the year as the x-axis moves from year to year? Is that right?

• ###### Dynamic placement of Text in Chart

Yes that's right. But as the selection of the year changes, the text in the chart need to be dynamic in both the text display as well as the position display. Having 2 dimension does not work, as mention, as i am calculating a moving average.

• ###### Dynamic placement of Text in Chart

Can you exclude the second dimension from the moving average calc using aggr()?

-Rob

• ###### Dynamic placement of Text in Chart

Nope it does not work when i try 2nd dimension with the aggr, it give me the graph as shown in the attachment.

• ###### Re: Dynamic placement of Text in Chart

If you post a sample qvw I may have some ideas. But in the meantime here's a concept using a vertical split axis chart that may give you some ideas.

-Rob

• ###### Dynamic placement of Text in Chart

Its a good way to implement the split axis chart thanks rob I have never thought about it before but as I have more than 1 expression (3 moving averages), I cannot hide the legend. Also, I am using a fiscal year which does not follow conventional date system, which I cannot really use normal date. Attached is a sample file I edited from the one rob supplied. *Edited: How do I upload the sample qlikview file? Once I got it uploaded, the sample file will be available.

• ###### Dynamic placement of Text in Chart

Click "use advanced editor" in the top right of the reply text box.

• ###### Dynamic placement of Text in Chart

I am sorry, rob's answer is the correct answer i am looking for. We can just make the year expression invisible to achieve what we want! Thanks rob!