Fiscal Year as Query Criteria

BigNate

Board Regular
Joined
Dec 17, 2014
Messages
242
Hello Everyone,

I created a new field in my query called FiscalYear, where I want the field to identify the fiscal year, where the fiscal year runs from April to March of the next year. I successfully have this field created. My expression for this calculation is as follows:

IIf(Month([ClaimInputTbl]![DateofComplaint])>3,Year([ClaimInputTbl]![DateofComplaint]),Year([ClaimInputTbl]![DateofComplaint]))

Here is where my problem is though--I want my query to only show records that are for the current fiscal year.

Can someone please tell me how to do that? Thanks!
 
Hello Everyone,

I created a new field in my query called FiscalYear, where I want the field to identify the fiscal year, where the fiscal year runs from April to March of the next year. I successfully have this field created. My expression for this calculation is as follows:

IIf(Month([ClaimInputTbl]![DateofComplaint])>3,Year([ClaimInputTbl]![DateofComplaint]),Year([ClaimInputTbl]![DateofComplaint]))

Here is where my problem is though--I want my query to only show records that are for the current fiscal year.

Can someone please tell me how to do that? Thanks!

Why would you want to hard code this when the fiscal year changes ever year?

Yeah, that's the true challenge of this original task at hand. The code needs to work for any day going forward and needs to first identify what fiscal year the analysis is being done in.

Thanks again everyone.

I thought He/She just want to get the result for the present FY. Adapt the following in your expression. I've tested and it works like a charm

Fiscal Year: IIf([DateofComplaint]>=DateSerial(Year([DateofComplaint]),4,1) And [DateofComplaint]<=DateSerial(Year([DateofComplaint])+1,3,31),"FY " & Year([DateofComplaint]) & "-" & (Year([DateofComplaint])+1),"FY " & (Year([DateofComplaint])-1) & "-" & (Year([DateofComplaint])))
 
Upvote 0

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
Understood, I was just reiterating what you were saying in post #8. It is a huge skill to have the ability to do what you do. I have a ton of Excel code saved for date extraction and stuff like this, and it comes in handy all the time.
 
Upvote 0

Forum statistics

Threads
1,221,838
Messages
6,162,286
Members
451,759
Latest member
damav78

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top