Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
BI & Data Trends 2021. Discover the top 10 trends emerging in today. Join us on Dec. 8th REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Contributor III
Contributor III

Custom Year as well as Calendar year

Hello,

I am creating an app that needs two calendars for comparisons.  I have one for Jan-Dec in general, which is fine. However, I also need a Aug-Jul calendar. I need to produce KPI and the equivalents of sumifs using this calendar. I have already produced something but I would like it to be more automated so I do not need to change the expression upon each year (if this is the only way?)

(sum({<[Date of report.autoCalendar.YearMonth]={'2018-Aug','2018-Sep' etc...},[Year2]={'2019'}>} [Net Value]))

i.e. is there something in the equivalent of a YTD for a custom year:  {">=$(=YearStart(max([Date of report])))<=$(=max(Month))"}>}

In the example above the 2018-Aug to 2019-Jul is year, however we do also look at Jan-Dec year as previously mentioned. 

I have not previously touched the script, however, if there is a way to do it I do not mind venturing to it. 

2 Replies
Highlighted
Partner
Partner

Hi

I think you can do it in the frontend by using Date and time functions using month start, year start, month-end, and month, etc .Go through these concepts you will get an idea 

Hope this info helps

Thanks

Highlighted
Contributor III
Contributor III

This would bee fine, but because I want to do YTD functions that are automated - i.e. not having to go into the script and change the number of months to minus from current month. As my current solutions is similar to this, but I would like it to be automated for Aug-Jul