Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

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

1 Solution

Accepted Solutions
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

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

View solution in original post

8 Replies
Jason_Michaelides
Luminary Alumni
Luminary Alumni

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?

Anonymous
Not applicable
Author

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.

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

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

-Rob

Anonymous
Not applicable
Author

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

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

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

Anonymous
Not applicable
Author

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.

Jason_Michaelides
Luminary Alumni
Luminary Alumni

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

Anonymous
Not applicable
Author

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!