Qlik Community

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
IMPORTANT security patches for GeoAnalytics Server available to download: READ DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
UserID2626
Creator III
Creator III

Get Month From date format(MM/DD/YYYY)

Hi everyone,

Considering that there is 1000 records which is four months data, from that I am trying to extract the max month from my date format(MM/DD/YYYY) to find sum(amount).

Date attribute name E_date(MM/DD/YYYY)

i tried using the Expression in many ways to get month sum, 

       1) Sum({$<Month([E_Date])={"$(=Month(Max(Date([E_Date],'MM/DD/YYYY'))))"}>}Amount)

2) Sum({$<Month(Date([E_Date],'MM/DD/YYYY'))={"$(=Month(Max(Date([E_Date],'MM/DD/YYYY'))))"}>}Amount)

      3)  Sum({$<Date([E_Date],'MM/DD/YYYY')={"$(=Month(Max(Date([E_Date],'MM/DD/YYYY'))))"}>}Amount)

4) Sum({$<Date(Month[E_Date],'MM/DD/YYYY'))={"$(=Month(Max(Date([E_Date],'MM/DD/YYYY'))))"}>}Amount)

 

Could you help me how to achieve it.

 

Thanks 🙂

Labels (4)
1 Solution

Accepted Solutions
UserID2626
Creator III
Creator III
Author

I got a solution with the below expression

Sum({$<[E_date.autoCalendar.Month]={"$(=Month(Max(Date([E_date],'MM/DD/YYYY'))))"}>}Amount)

 

Thanks for helping me 🙂

View solution in original post

3 Replies
tush
Creator II
Creator II

Hi,

    Take a table from chart, take dimension as date {Ex. Order Date} after that add another dimension in the table as =[Ship Date.autoCalendar.Month] it will show month of the particular date.

 

Thanks

Tushar

tarun_singh1989
Contributor II
Contributor II

Try DATE# may be the date in your data is string.
MONTH(Date(Date#(E_Date,'MM/DD/YYYY'))).
UserID2626
Creator III
Creator III
Author

I got a solution with the below expression

Sum({$<[E_date.autoCalendar.Month]={"$(=Month(Max(Date([E_date],'MM/DD/YYYY'))))"}>}Amount)

 

Thanks for helping me 🙂