Priyank Dwivedi Posted March 30, 2023 Share Posted March 30, 2023 What's the easiest way to evaluate the number of days in a fiscal quarter based on a given date? Link to comment Share on other sites More sharing options...
Kirsten Smith (she/her) Posted March 31, 2023 Share Posted March 31, 2023 Can you clarify further what you are looking for? Do you want to select a date and then return the total number of days for the Fiscal quarter that contains that date? Or days to the end of the Fiscal quarter? Working days, or total days? With or without holidays? Once we have a better understanding of your request we can make suggestions. Link to comment Share on other sites More sharing options...
Priyank Dwivedi Posted April 13, 2023 Author Share Posted April 13, 2023 That's right, Kristen. I wish to select a date and get the total number of days for the Fiscal quarter the selected date lies within. It would be great to get working days and total days separately. Link to comment Share on other sites More sharing options...
Solution Kirsten Smith (she/her) Posted April 14, 2023 Solution Share Posted April 14, 2023 I think you will find that this will be better accomplished in a TERR data function than using Spotfire functionality. You can read more about data functions here:https://docs.tibco.com/pub/sfire-analyst/12.3.0/doc/html/en-US/TIB_sfire-analyst_UsersGuide/index.htm#t=df%2Fdf_how_to_use_a_predefined_data_function.htmHere's a link to a YouTube video about creating data functions: Link for TERR documentation:https://docs.tibco.com/products/tibco-enterprise-runtime-for-rI'd recommend that you start with the R package 'bizdays', as it has a lot of the functionality you are asking for:https://cran.r-project.org/web/packages/bizdays/bizdays.pdfPass the selected date into the data function, then you can use the package to identify the fiscal quarter and return the desired number of days. Link to comment Share on other sites More sharing options...
Priyank Dwivedi Posted April 26, 2023 Author Share Posted April 26, 2023 Thanks Kirsten. That's helpful. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now