Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Shubham_Deshmukh
Specialist
Specialist

How to get financial start date of previous year from current date?

I have startdate & enddate of current year.

e.g.

Now If any1 select enddate = '1 May 2017' , then I want startdate = '1 Apr 2016' & enddate = '1 May 2016'

My expression will be lastyear be like

=dateField > startdate and dateField < enddate.

9 Replies
Anil_Babu_Samineni

Where are you trying this, set analysis?

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Shubham_Deshmukh
Specialist
Specialist
Author

Nope.Simple If else thats it.

Shubham_Deshmukh
Specialist
Specialist
Author

For not considering current selections I will have to use set analysis thats it.

Anil_Babu_Samineni

To simplify try this

If(dateField > startdate and dateField < enddate, requiredfield)

And set analysis may be this

Only({<dateField = {"=dateField > startdate and =dateField < enddate"} >} measure)

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Shubham_Deshmukh
Specialist
Specialist
Author

Done Sir.

M getting previous year Financial yr start by using this,

=AddYears(makedate(year(Enddate),4),-1) gives 1 Apr of lastyear

Anil_Babu_Samineni

Your question is not similar to original thread

Anyway, mark your response as correct to close this thread

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Shubham_Deshmukh
Specialist
Specialist
Author

Thanks.

Shubham_Deshmukh
Specialist
Specialist
Author

How to mark as correct ans?

Anil_Babu_Samineni

Qlik Community Tip: Marking Replies as Correct or Helpful

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful