Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Summarizing based on Date

I have a date field in my database (MM/DD/YYYY) and would like to be able to summarize by year and or month. How can I display just month in the 'X" axis of a chart?

Thanx

13 Replies
Not applicable
Author

use this :

Day(Date_Field) for day

Month(date_Field) for Month

Year(Date_field) for Year

Not applicable
Author

HI,

You have to do a table calendar

See below exemple.




Calendar:
Load
Date,
Year(Date) AS Year,
'Q' & ceil(month(Date)/3) AS Quarter,
Month(Date) AS Month,
MonthName(Date) AS MonthName,
Week(Date) AS Week,
WeekName(Date) AS WeekName,
Day(Date) AS Day,
WeekDay(Date) AS WeekDay;
Load Distinct Date
From FactTable;


Not applicable
Author

Hi Ashwin

Thanx for the response.....forgive my igonrance, but where do I put that syntax? Is it in the expression which I dont understand because it is a selected field or is it in the script.

Thanx and sorry

Not applicable
Author

Hi Fernando,

I do not have a Calendar table. That being said, where would your suggested script go? Within the Load portion of my table or does it get it's own load...I am new to Qlikview and have not yet been able to attend training so if the question seems elementary I apologize.

Thanx

suniljain
Master
Master

TABLE:

load

SUM(X) AS amt,

MONTH(date) AS month,YEAR(date) AS year

resident abc group BY MONTH(date) ,YEAR(date) ;

Not applicable
Author

HI,

The best practices of the QlikView recommends using a calendar table.

See the files in My Files.

http://community.qlik.com/members/ftonial/files/default.aspx

Not applicable
Author

Hi,

Those load statements worked.......what would be the syntax for Month Year? (MM/YYYY

Not applicable
Author

Hi,

Date(Date,'MM/YYYY') as MonthYear

suniljain
Master
Master

Dear Fernando,

Thanx , I alredy ahve that file and enough material that I already referred.

Regards

Sunil