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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
UserID2626
Partner - Creator III
Partner - 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 (3)
1 Solution

Accepted Solutions
UserID2626
Partner - Creator III
Partner - 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
Partner - Creator III
Partner - 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 🙂