Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, I 'm new in qlikview. I have different dates in one of the column and i would like to create a bar chart sorted by month. I appreciate if anyone can help me
thanks in advance
Dates are usually stored as number (though showing as date). I suggest sorting your chart on that column by number.
please post sample data/application to demonstrate with.
regards
Marco
You will have to calculate a month value from your date column in your load script, like
LOAD ...
DateColumn,
Month(DateColumn) AS MonthColumn,
:
Amount
FROM whereveryouwant (options);
Now you can create a bar chart with dimension MonthColumn and expression =sum(Amount).
Alternatively, you could create a calculated dimension =Month(MonthColumn) and use it with the same sum expression. But that won't be the most efficient solution (performance-wise). The script solution is the-right-thing-to-do.
Best,
Peter
Hi,
I attached you an exmaple (but is in spanish language. I'm sorry).
hi
create an inline table with month and month_num field with 1 to 12 .
then sort by month_num
Regards
$@M.
Hi ,
Data:
LOAD * ,
Month(Date) As Month,
Num(Month(Date)) as MonthNum
INLINE [
Date, Sales
01/01/2015, 1
01/02/2015, 2
01/03/2015, 4
01/04/2015, 1
01/05/2015, 6
01/06/2015, 3
01/07/2015, 6
01/08/2015, 9
01/09/2015, 11
01/10/2015, 6
01/11/2015, 7
01/12/2015, 9
];
MonthNum_Sort:
LOAD * INLINE [
MonthNum, MonthNum2
1, 1
2, 2
3, 3
4, 4
5, 5
6, 6
7, 7
8, 8
9, 9
10, 10
11, 11
12, 12
];
Here in the above data the Monthnum_Sort is taken but it also can be done at front end in the bar chart ,Dimension Sorting.
Output:
PFA,
HTH,
-Hirish
Many thanks. I'll try it out and let you know..
Thank you for your reply, I have "Hire Date" as field showing dd/mm/yy. The records that I am currently working on is approximately about 12,000.
I want to have the year as YYYY and the month as MMM to show in the right order. The year should not repeat based on records.
I've tried the load as per your comments but it gives me an error.
Would you please show me a step by step process.
Regards
Thanks Enrique