Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
[View:http://community.qlik.com/cfs-file.ashx/__key/CommunityServer.Discussions.Components.Files/11/3513.Line-Chart.docx:550:0]
Hi,
For a line chart, if I select to sort the month in ascending order, by default it will start with Jan, Feb. Mar ..............Dec.
However,if I would like the starting month of the x-axis to be Oct, followed by Nov, Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep instead, may I know how can I achieve this ?
Thank you,
Sharon
Hello,
typically one has the month drived from a date field, using a master calendar for the month information.
If you have a master calendar, make sure it includes a month-year field (01-2009, 02-2009, ...,07-2010, 08-2010; or the like).
Use this field as dimension rather than pure month. You can format (number format) the dimension field to just show the month information.
hth,
Thilo
Hi Thilo,
Thank you for your reply. However, I still cannot figure out how can a month-year field be used to explicitly specified the starting month of the x-axis. Could you please elaborate ?
BTW, I am using the dimension month(entrydate) as the x-axis now.
Thank you.
Sharon
Hi,
You can use dual function to ahcieve this.
Create a inline table as below.
LOAD dual(Month,Seq) as Month_New;
INLINE [
Month,Seq
Oct,1
Nov,2
Dec,3
Jan,4
Feb,5
Mar,6
Apr,7
May,8
Jun,9
Jul,10
Aug,11
Sep,12
];
Then map this Month_new Field to your transaction Month. Use this Month_New field in your chart .
-Sridhar
Sharon,
As I understand, you want a line chart where month is dimension and insted of Jan, Feb, Mar...... you want in Oct, Nov, Dec fashion.
To do this make an inline table with first column month and second column an int value like 12, 11 etc, thus make Oct have int val 12 and Nov have int val 11.
Now in line chart, do sort with expression and give the name of int column in sorting expression.
If ok mark replied.
Shubhu.
It works. Thank you.