Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Nick2
Contributor
Contributor

YTD excluding current month and Last YTD excluding current month

Hi,

I wondered if someone might be able to help me, Im pulling my hari out trying to sort it! 🙂

I am trying to get year to date for the Financial Year (April onwards) excluding the current month for both this year and last.

The indicator Year to date below works fine its just the YTD for the previous year from April excluding the current month I am struggling with (see Request_LYTD_Ind below). 

 

if(inyeartodate(date(TempDate), today(), 0, 4), 'Y','N') as Request_YTD_Ind

if(inyeartodate(date(TempDate), today()-1, -1, 4), 'Y','N') as Request_LYTD_Ind

 

Any idea what changes I need to make to 'Request_LYTD_Ind' above in order to exclude the current month for the previous year (which would be June 2018 as it is now)?

Many thanks in advance! 🙂

 

 

 

Labels (1)
  • ytd

1 Reply
sunny_talwar

You can give this a shot

=If(InYearToDate(TempDate, MonthEnd(Today(), -1), -1, 4), 'Y', 'N')