7 Replies Latest reply on Nov 13, 2018 5:49 PM by Dan Cory

# convert FYTD

Hello,

I hope this message finds you all well.

I have been scouring the internet to help me with my problem - I think it is pretty elementary; however, I just started so I'm having a hard time following the online blogs, webpages, etc.

Anyways, on the attached, I would like to calculate the fiscal year to date based on the selection from the parameter "Select Date". My companies fiscal year starts in October and obviously ends in Sept,

the solution would show, if the "select date" parameter was set to "November 2018" then the viz would only show Oct 2018 and Nov 2018. Another example if the date was set to September 2018, you would see October 2017 to September 2018.

Thank you all!

Cheers!

Andrew

• ###### 1. Re: convert FYTD

First of all, did you know that Tableau handles your fiscal year for you?  Right click on your date field and under Default Properties you can tell tableau when your fiscal year starts:

Having said that, let me recommend that you don't use a filter.  Use a parameter, and then make a calc to figure out what you should show your user based on the month selected.

Give me a bit, and I'll hack up something.

EDIT:  My bad.  You already have a parameter.  I'll do something with that.

• ###### 2. Re: convert FYTD

thanks for the help, Joe.

Looking forward to seeing your solution

• ###### 3. Re: convert FYTD

At our business we have an October fiscal year too.

In the attached, this is how we mess with date filters.

• ###### 4. Re: convert FYTD

Hey Joe,

THanks so much for the proposed solution. I understand a good majority of the code; however, I noticed you are using the today() function. In my actual dataset I have multiple years (goes back to 2012). I think I need to change the Today part if I wanted to set my parameter to lets say "Dec 2013" -> I would then expect the outcome to show Oct, Nov, and Dec 2013.

I hope I'm being clear.

Cheers!

• ###### 5. Re: convert FYTD

My filter in the example was simplified.  I was just doing current year.  You might want to give the user another filter to select the FY to view.   (And then you could probably just do away with the FY Today calc.)

• ###### 6. Re: convert FYTD

It just dawned on me what you are really looking for.

See attached.  I'm back to using your original parameter.

• ###### 7. Re: convert FYTD

Here's another solution: