Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I tried to add a vertical line to my chart and I know that it requires x-axis has to be continous. My x-axis is year month, fore example 201101, 201102...201302. The problem is that the chart are totally changed after changing the data to continuous. How to handle this situation? Thanks
Longmatch
Your YearMonth is just an integer showing YYYYMM, that's why your continuous numeric axis shows a large gap from e.g. 201112 to 201201 (89 increment instead of 1 increment).
I would suggest to create your YearMonth using an underlying QV date:
Timestamp#(YearMonthNM,'YYYY-MM') as YearMonth2
this should solve your issue (see also attached).
Totally changed in what way ?
You may need to force the yearmonth to be a number by wraping Num() around it, either in the script as another field, or in a calculated dimension.
If it's not that, then ...
Are all the dimension possible values added in ? This would be good for showing a continuous timseries.
Are you getting too long a series of dates now ? A calculated dimension or Dimension limits may help you to cutt out the earliest or latest dates.
You may need to
Jonathan
I forced YearMonth to be a number in demension definition by using NUM(YearMonth), but the result is still the same after changing the x-axis to continuous. I think I got too many data points after convert the data to continuous. I do not know how to solve this problem. Please see my sample in the attachment, you will have a better idea about my problem. Instead of changing it to number, is this possible to change YearMonth to Date and make it continuous?
Thanks
Longmatch
Your YearMonth is just an integer showing YYYYMM, that's why your continuous numeric axis shows a large gap from e.g. 201112 to 201201 (89 increment instead of 1 increment).
I would suggest to create your YearMonth using an underlying QV date:
Timestamp#(YearMonthNM,'YYYY-MM') as YearMonth2
this should solve your issue (see also attached).
It worked perfectly. Thank you very much.
I do not know this function before. I do not think I know how to use it by reading the Help or user manual. I think there are many many more useful functions in Qlikiview. What is the best way to learn them?
A lot things I thought are not possible actually can be done with your helps. Thanks, thanks, many thanks.
Longmatch
Hi,
Also you can try using Dual() function which allows a value to have both string and numeric representation at once.
Sorry have no time to experiment.
Best regards,
Maxim
Somehow the YearMonth2 converted from Timestamp# function is still in YYYY-MM (2011-09) format and it displayed on the x-axis of my chart. After I changed the Dimension axis to continuous, 2011-01 became 40550 and 2011-02 became 40600. Not sure why?
You need to set the format of the continuous axis to Date (and adapt the format code if needed) in number tab.
Check my attached sample how I did this.
But a continuous axis might be difficult to format exactely to your reqs (start / end / increment). That's one of the drawbacks of the continuous axis IMHO.
Thanks. It works fine now.
After changed the dimension axis to continuous and change the data type to Date, the labels of x axis are way below the axis, please see the screen shot. Is there any way I can make it close to the x-axis? Another question is how to change the text of vertical line to vertical.
Hi,
As for labels, the only way I know is to activate a chart, press & hold Ctrl+Shift, once you see red borders (wherever they appear) you can start moving/sizing them in order to adjust size and position of elements of the chart. Be careful, some moves can lead to negative results, but you can create copy of the chart or use Reset User Sizing/Docking buttons at the General tab of the chart properties dialog.
Best regards,
Maxim