Skip to main content
Announcements
Qlik Launches Open Lakehouse and advanced agentic AI experience in Qlik Answers! | LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Pete673
Contributor II

YTD to a selected month from autocalendar

Hi guys

Newbie here trying to make sense of time handling.

I have an auto generated calendar and am trying to calculate YTD to a month but getting nowhere fast.
I'm happy staying with autocalendar for the moment so would like to make the logic work here.

This is what I have so far:

Sum({<MACat01 = {'Money'},
 MADate.Autocalendar.Year = {$(Max(MADate.Autocalendar.Year)},
 MADate = {<=$(MAX(MADate)},MADate.Autocalendar.Month=,MADate.Autocalendar.Day=,MADate.Autocalendar.MonthYear=},
 Stream = {'Actual'}>} Amount)

1. My problems may lie around which items to exclude (month, day, Monthyear) but not sure from autocalendar which to include or not (or even why we do this?)

2. Do I need to reference whole field "path"? ( tried without - still problematic).

3. don't want to create a master calendar as a newbie since this would mean unlocking data manager fed stuff in the script. So need to make work with autocalendar.

4. I have looked at other posts but still struggling.

Any help greatly appreciated

Confused

Pete

Pete

 

2 Replies
PrashantSangle

there are few syntax error
try below

Sum({<MACat01 = {'Money'},
MADate.Autocalendar.Year = {"$(=Max(MADate.Autocalendar.Year))"},
MADate = {"<=$(=Date(Max(MADate)))"}, MADate.Autocalendar.Month=, MADate.Autocalendar.Day=, MADate.Autocalendar.MonthYear=,
Stream = {'Actual'}>} Amount)
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 🙂
Pete673
Contributor II
Author

Thanks ever so much for prompt reply.

Still doesn't work?? With filter on year 2019 and month Feb measure still shows just feb; Need YTD to feb?

Help?

Pete