Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Ahmed_Hisham
Contributor
Contributor

Time range set analysis

Dears,

 

Kindly can any one help with this script to calculate 12 month sum

 

Sum({<[Month Date.autoCalendar.Year]=, [Month Date.autoCalendar.Month]=, [Month Date.autoCalendar.Date]={">=$(=date(MonthStart(Max([Month Date.autoCalendar.Date])),M/D/YYYY), -11))<=$(=Date(Max([Month Date.autoCalendar.Date]),M/D/YYYY))"}>} Qty )

 

The date in load editor is

SET DateFormat='M/D/YYYY';

Labels (1)
1 Solution

Accepted Solutions
PrashantSangle

  • Sum({<[Month Date.autoCalendar.Year]=, [Month Date.autoCalendar.Month]=, [Month Date.autoCalendar.Date]={">=$(=date(MonthStart(Max([Month Date.autoCalendar.Date]),-11),'M/D/YYYY'))<=$(=Date(Max([Month Date.autoCalendar.Date]),'M/D/YYYY'))"}>} Qty )

check above.. check all internal sets some of them incorrectly parameterised .

 

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂

View solution in original post

4 Replies
PrashantSangle

what is error you are getting?

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
Ahmed_Hisham
Contributor
Contributor
Author

Hi,

 

it returns only the value of (=Date(Max([Month Date.autoCalendar.Date]),M/D/YYYY) not the sum of the range

 

 

PrashantSangle

  • Sum({<[Month Date.autoCalendar.Year]=, [Month Date.autoCalendar.Month]=, [Month Date.autoCalendar.Date]={">=$(=date(MonthStart(Max([Month Date.autoCalendar.Date]),-11),'M/D/YYYY'))<=$(=Date(Max([Month Date.autoCalendar.Date]),'M/D/YYYY'))"}>} Qty )

check above.. check all internal sets some of them incorrectly parameterised .

 

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
Ahmed_Hisham
Contributor
Contributor
Author

Thanks alot,

It worked like a charm