Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Announcing the newest addition to the Qlik Community, Qlik Gallery! Learn More
UserID2687
Contributor

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 🙂

1 Solution

Accepted Solutions
UserID2687
Contributor

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

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 🙂

3 Replies
tush
Contributor II

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

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
New Contributor II

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

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

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

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 🙂