Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
deepak_gupta
Partner - Contributor II
Partner - Contributor II

same date last month of the last year

Dear Expert,

Kinldy help me on creating a logic.

we have Same day of current year and want to show same day of the last month of the last fin year.

For Ex-

Date,  Expected Output

03/09/2018, 03/03/2018

21/08/2018, 21/03/2018

15/08/2018, 15/03/2018

We will appricate your help.

Thanks in advance.

1 Solution

Accepted Solutions
tresesco
MVP
MVP

Since your month is fixed (last month of last year - always March), you could try like:

=MakeDate(Year(YearStart(Date,0,4)), 3, Day(Date))

View solution in original post

5 Replies
Anonymous
Not applicable

obviously your financial year goes from April to march?

do you have a mastercalender for your fiscal year

=date(day(date(ExDate)-1)+monthstart(date(max({<Financialyear={'$(=Financialyear-1)'}>}Financialdate))))

if you donot have a mastercalender use this Expression (hardcoded for this year):

more flexible if you use a field for the year

=date(day(date(ExDate)-1)+date('01/03/2018'))

Anonymous
Not applicable

Hi

Please Try this condition

=Date((Floor(YearStart(today(),0,3)))+(Day(Today())-1),'dd/MM/yy')

Regards

RItesh

tresesco
MVP
MVP

Since your month is fixed (last month of last year - always March), you could try like:

=MakeDate(Year(YearStart(Date,0,4)), 3, Day(Date))

Anonymous
Not applicable

Hi Deepak,

Kindly Use Condition in your scenario

=Date((Floor(YearStart([Field Name],0,3)))+(Day([Field Name])-1),'dd/MM/yy')


Regards,

Mazhar

deepak_gupta
Partner - Contributor II
Partner - Contributor II
Author

thanks for your response but this condition fail in march month.