Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi,
i have a 12 month rolling chart ....now i have to add an YTD, 6month rolling and 12month rolling bar on the right side of the chart.
is this in qlikview relizable? How to add 3 bars or datapioints which are not part of the dimension? the point is that all will have the same expression......
when i add YTD,6mr and 12mr to the calander in the skript i guess this is the only way to handle? am i right?
but then i have the problem that the bars will also change their position and won't stay on the right end?
regards,
corleone
It is possible if you precalculate these bars in the script, as one dimension. To keep them in order, assign a numbers to them (as a separate field will be easier here than using dual), and sort by the numbers.
thx, i thought there would be a way without skripting.......
regards
Here are a couple ways to do it. One has minor scripting, in that it sets up a completely independent field X that has a list of values of all the months plus YTD, R6M and R12M. This is used as the dimension, then we connect data to that dimension in the expression. It has two weaknesses. First, it still requires script. Second, you can't put in a linear trend line because it will include the last three columns in the trend.
The second doesn't require any scripting, and is my preferred approach. It uses two charts overlaid to look like a single chart. The two charts use a static maximum to make sure the axis has the same scale. The first chart is a regular chart by month and has the trend line. The second chart uses a valuelist, and the expression uses pick() to assign the right expression to each value in the list. A weakness is that since it is two independent charts, you can't export the image, export to Excel, minimize and maximize and so on.
Since you only have three extra data values to plot, ?why not make Reference Lines (from Chart->Presentation tab) instead of those right-most three bars? You can set their values to expressions based on aggregate bar-data, or really whatever you'd like. They might get in the way of your trending lines, but if you choose colors well even that might not be a problem. Good luck.