Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Group by Month - Charts

Dears,

I have another problem.

How can I group by month the values in my chart. Coz actuallu it is showing every date like (01/01/2010, 01/02/2010, 01/03/2010...) I need to group it by month.

Follow attached is the example.

Could you please help me?

1 Solution

Accepted Solutions
Not applicable
Author

use this

=date(Monthname([Cal Date]),'MM-YY')

View solution in original post

23 Replies
matt_crowther
Luminary Alumni
Luminary Alumni

I'll take a wild guess: add either a Calculated Dimension under the Dimensions tab of =monthname(MyDateField) or add the same expression into your load script:

Table1:

Load FieldA,

monthname(MyDateField) as Month

From XYZ.xls

Hope that solves it,

Matt - Visual Analytics Ltd

Not applicable
Author

Sorry,

I didn't understand it, could you do an example for me please.

It's my first time using QlikView and I'm completely confused.

Thanks for instance per your assistence.

Have a nice day

Not applicable
Author

Hello kellyhbastos

within the script-languange of QV exist a lot of functions to format, transform, calculate data. In your case you should take a look at the date-functions. There is a Month()-function you can use for your purpose to create a new field containing the Month of the Date during the load.


LOAD
Date,
Month(Date) AS Month,
Year(Date) AS Year,
Value
FROM ....


The code above will create two new fields called Month and Year to use as a dimension in a chart, (as you want it to do) or in an expression (if you need to). For more details see help and.or your manuals.

Regards, Roland

Not applicable
Author

Thanks Again Roland,

It's working perfectly!

Bye

IAMDV
Luminary Alumni
Luminary Alumni

Please can you mark the post verified, if this works for you 🙂

TIA!

Not applicable
Author

It worked, but there is another problem.

Since I'm using the expression "=sum([Mont])" and I have values from different years, the software is suming the values of January 2010 and January 2011. How can I separate it?

Maybe I should have to concatenate (Month) and (year)

How can I do it/

Thanks

Miguel_Angel_Baeyens

There are different ways of doing that.

But basically, the Date() function will allow you to say how do you want to display any given date, for example

Date(DateField, 'MMMYY')


wil return "jan10", "jan11", "feb10" and so on.

Hope that helps.

Not applicable
Author

try load
Not applicable
Author

I didn't worked here.
how can I concatenate Month and Year?

Thanks