# Creating a Fiscal Date formula

I have created a Crystal Report and wrote a formula that allowed me to match my database entries to my fiscal months.  However, my subsequent year to date formula based off my month to date formula will only bring in current month data.  It won't bring in previous month data.  Is there an easy method within Crystal Reports to set the MonthtoDate function to a fiscal month?  Or a formula that will use the MonthtoDate function based on a fiscal month rather than a calendar month?

Ian,
Formula below selects the cost to use for the current month costs.  It works well.
if ({@Cur_Mon})= "January" then {COST.TOTAL}
else if ({@Cur_Mon}) = "February" then {COST.TOTAL}
else if ({@Cur_Mon}) = "March" then {COST.TOTAL}
else if ({@Cur_Mon}) = "April" then {COST.TOTAL}
else if ({@Cur_Mon}) = "May" then {COST.TOTAL}
else if ({@Cur_Mon}) = "June" then {COST.TOTAL}
else if ({@Cur_Mon}) = "July" then {COST.TOTAL}
else if ({@Cur_Mon}) = "August" then {COST.TOTAL}
else if ({@Cur_Mon}) = "September" then {COST.TOTAL}
else if ({@Cur_Mon}) = "October" then {COST.TOTAL}
else if ({@Cur_Mon}) = "November" then {COST.TOTAL}
else if ({@Cur_Mon}) = "December" then {COST.TOTAL}
Formula below creates "Cur_Mon".  Selects the dates that the costs were incurred correctly into the fiscal month.
if {@Fiscal_Month}in DateTime(2011, 01, 01, 0,0,0) to DateTime(2011, 01, 29, 0, 0, 0)
then "January"
else if {@Fiscal_Month} in DateTime(2011, 01, 30, 0, 0, 0) to DateTime(2011, 03, 05, 0, 0, 0)
then "February"
else if {@Fiscal_Month} in DateTime(2011, 03, 06, 0, 0, 0) to DateTime(2011, 04, 02, 0, 0, 0)
then "March"
else if {@Fiscal_Month} in DateTime(2011, 04, 03, 0, 0, 0) to DateTime(2011, 04, 30, 0, 0, 0)
then "April"
else if {@Fiscal_Month} in DateTime(2011, 05, 01, 0, 0, 0) to DateTime(2011, 06, 04, 0, 0, 0)
then "May"
else if {@Fiscal_Month} in DateTime(2011, 06, 05, 0, 0, 0) to DateTime(2011, 07, 02, 0, 0, 0)
then "June"
else if {@Fiscal_Month} in DateTime(2011, 07, 03, 0, 0, 0) to DateTime(2011, 07, 30, 0, 0, 0)
then "July"
else if {@Fiscal_Month} in DateTime(2011, 07, 31, 0, 0, 0) to DateTime(2011, 09, 03, 0, 0, 0)
then "August"
else if {@Fiscal_Month} in DateTime(2011, 09, 04, 0, 0, 0) to DateTime(2011, 10, 01, 0, 0, 0)
then "September"
else if {@Fiscal_Month} in DateTime(2011, 10, 02, 0, 0, 0) to DateTime(2011, 10, 29, 0, 0, 0)
then "October"
else if {@Fiscal_Month} in DateTime(2011, 10, 30, 0, 0, 0) to DateTime(2011, 12, 03, 0, 0, 0)
then "November"
else if {@Fiscal_Month} in DateTime(2011, 12, 04, 0, 0, 0) to DateTime(2011, 12, 31, 0, 0, 0)
then "December"
else "Frog-guts"
Fiscal_Month actually compares two date fields in the database and uses the one which is not empty.
The formula below is my "Year to Date" formula.  I've tried several different ways to write it, but it just mimmicks my current month formula.
In the end is just is a simpler way to write my first formula above.  How can I make my year to date formula add all the costs that have occured to date?
if ({@Cur_Mon}in ["January", "February","March","April","May","June","July","August","September",
"August","October","November","December"]) then {COST.TOTAL}

### Similar Messages

• Creating a fiscal date table that includes Day of Year and Week of Year column

Hi,
Our fiscal year runs between 1st October through to 30th September and I'm trying to create a date table that I can use to represent this in Powerpivot (I'm using Excel 2013). I had no probably creating columns for Fiscal month or fiscal year, however I am
having issue breaking it down more than that, specifically I cannot work out how to calculate:
- day of the year
- week of the year (with week one starting on the first day of the year rather than the first Monday)
I worked out how to do the day of the year until I had to try and account for leap years which broke the formula I had! Can anyone please recommend solutions, I cannot see anything online about this. Obviously I know that it is simple to do this for a normal
calendar year but this approach doesn't work with a custom fiscal year.
Whilst it is useful for several reasons, my main reason for wanting week is so that I can plot my Pivotcharts more smoothly (although I may have missed an easier way to do that).
Thanks,
James

For my example I started with 1 column in Power Pivot called [Date]
I created the following Columns
[DayofMonth] =Day([Date])
[MonthNumber] =Month([Date])
[Fiscal Year] =IF([MonthNumber]< 10, Year([Date]), (Year([Date])+1))
[Fiscal Day] =[Date] - DATE(([Fiscal Year] -1), 10,1) +1
[Fiscal Week] =RoundUp([Fiscal Day] / 7, 0)
Change [Date] to whatever your date column is and those DAX formulas will get you what you need

• Date formula variable with replacement path.

Hi ,
I have date formula variable with replacement path.
Variable pop up with date format yyyymmdd. but i want dd.mm.yyyy.
I have checked my user profile setting and it is dd.mm.yyyy.
Can u please suggest it .
Thanks
Pramod

Thanks for the rely , but basically i need a variable only for selection.
thats why i have created formula variable processing my cutomer exit.
But i think customre exit variable comes with text format .
any1 has an idea for the same.
Thanks
Babu

• Date Difference between to date formula variable

Hi Expert,
I have create two formula variable one for Document Date and another one for Goods reciept date
and through formula variable I am subtracting these two formula variable and getting the no. of days between
document date and GR date.
This Shows me the correct value for one document date because i am filtering my query according to document
date,
while i am giving the date range for document date is shows me incorrect result. bucause document date formula
variable contains only one date.
Eg. i am giving the document date range like 01.02.2010 - 28.02.2010.
In document date formula variable it contains only 01.02..2010 and GR date formula variable it contain correct
value, thats why the date difference is incorrect because those PO which has PO date like 12.02.2010 for that Doc
formula variable bring the same date like 01.02.2010.
Thanks and Regards
Lalit Kumar

Hi Expert,
Actually i have created two formula variable on for PO date and another for GR date
and i've restrict the query through PO date.
while i am taking the single PO date in Selection parameter it showing me correct difference
eg: Selection Parameter for PO: 01.01.2010
But while i am taking the date interval for PO date
eg: 01.01.2010-30.01.2010
PO No: XXXXX123 , Doc date: 01.01.2010 GR date: 7.01.2010 then date difference is : 6
PO No: XXXXX432, Doc date: 03.01.2010 GR date: 8.01.2010 then date difference is : 7 but it is 5
Thanks and Regards
Lalit Kumar

• How to create a running total formula for different calendar years

Hello everyone,
I am looking for some help in creating a running total formula for different calendar years in Oracle. This is what I currently have organized in the crosstab report: vertically I have the cities from our database organized, then horizontially have the following information for each city:
2006 /2007 /2008
Amount /Amount Spent /Unspent Amount Amount Recieved/Amount Spent /Unspent Amount Amount Recieved/Amount Spent/Unspent Amount
Recieved
I am trying to create a formula that will specify each calendar year. For example, I'd like to have a formula in 2007 which would total the: 2007= {2006 unspent amount + the unspent amount in 2007} and same for 2008= {2007 unspent amount + the unspent amount in 2008}. I hope this is clear, I have simplified the report into a basic interpretation of what i've been trying to accomplish.
Would anybody know if this is possible and how to approach this?
Really appreciate it! Thanks.
Alex

Hi,
you can try and define a running total as a calculation in the crosstab as:
sum(Unspent Amount) over (partition by city order by year)
i find the crosstab format comfusing sometime since the aggregation is auto applied.
I would start with a flat table and then "duplicate is as a cross tab"
for your running total you can sort the data by the city,year and get it to 3 lines for each city, for example:
city year Unspent Amount all other amount...
X 2007 10
X 2008 20
X 2009 30
Y 2007 5
Y 2008 15
Y 2009 25
then you can use a funtion to calculate the amount :
sum(Unspent Amount) over (partition by city order by year)
this is the sql i used just to check it:
SELECT city,year,"Unspent Amount"
,SUM("Unspent Amount") over (PARTITION BY city ORDER BY YEAR)
FROM (
SELECT 'X' city, 2007 YEAR, 10 "Unspent Amount" FROM dual UNION ALL
SELECT 'X', 2008 ,20 FROM dual UNION ALL
SELECT 'X', 2009 , 30 FROM dual UNION ALL
SELECT 'Y', 2007 , 5 FROM dual UNION ALL
SELECT 'Y', 2008 , 15 FROM dual UNION ALL
SELECT 'Y', 2009 , 25 FROM dual
Tamir

• Date Formula variable

Dear All,
I have created Date formula variable and i have applied some exception aggregation on that to find Last bill date.
Now i am creating formula and applying following condition :
((If quantity > entered quantity) AND (Quantity2 ==0) ) * Sale date whr Sale date is exception aggr on date formula variable.
But when i apply this date format is changed to Number format.
Plz help ASAP.
Regards,
SS

I am using Billing date so it has reference to 0DATE.
So in this case how do i achieve this?

• Not able to edit the report created on different data source.....

I have a query regarding Report in OBIEE - reports developed from BI Publisher are specific to data source on which they have been created ??
i have a sample report that was created on different data source, i have the corresponding RPD also. I changed the data source according to my DB and when i try to update/edit the report,
on Analytics for adding a new column, it is generating a seperate new Query from QueryBuilder for that additional cloumn rather than adding up the new query with the previous one(existing report query). Is it because of mismatch of data source on which report had been created and on which it is being update ?? if it is the case, where do i need to make changes related to JDBC connection or others ??
when i try to create a new sample data set and try to update it, it adds up the extra edited things to original query and works perfectly fine. can ny 1 help me for the same ??

Hi Denis,
Normally,what we do is once we provide access to webi users group for each user from BO supervisor module, user(s) will able to refresh/edit the existing report from Full client BO.His colleagues have had no problem editing all his reports from their machines but he is not able to edit any report from his machine and BO is getting freeze.
He also reinstalled BO and cleaned out everything on his Computer and re-built it but the issue is not yet resolved
Can you please tell me how to resolve this issue
Kind Regards,
Srinivas

• BEX Query Views - Reqd in PRD but need to create in Dev - Data Issues

Hello Bw Gurus
BI 7.0 ECC 4.7
We have a BEx Query in BI production which uses a work centre hierarchy. The user wants to create query views on this query to use in BI production.
Our normal transport procedure of a new development object would be BI DEV - QA - PRD
However the DEV environment does not have all the work centres and the data of PRD. So if the query view needs to be created in DEV then we could not set up the view correctly as there is not the workcenters or the data in DEV.
Hopefully that makes sense?
Apart from allowing Query Views to be created in BI PRD directly is there any solution?
Best,
Steve Jones

If you need exact char values for workcenter to create your views you can quickly create the master data (just the values you want) in Dev and use them to create the views...

• How to create a linked data source with document libraries based on the same template?

I use SharePoint Foundation 2013, SP Designer and Visual Studio 2013 to my needs. But there are several things which i don't get.
I have a number of libraries which use the same template. I want to create a linked data source, that would contain them all, and if I add a library based on this template, the library would be added to the data sorce. Is it possible?
I tried creating linked data souces, but the view that it brings by default is limited(no sorting, etc.). How can it be modified?

I am planning to do my project on Linux with J2EE,Oracle technologies.You don't need to set up a DSN. Just use a JDBC connect string such as jdbc:oracle:thin:@localhost:1521:xe
~Jer

• Create a ReportingServices data source and upload to a data connection library

I have installed reporting services 2012 in SharePoint 2013 integrated mode. I need to create a report data source and upload it to a data connection library using
C#.
As I know it uses the ReportingServices2010 class but I cannot explore a reporting server url.
There is a ReportingServices2010.asmx file in the 15 hive though.
Also it works fine when I manually set the data source.

Hi,
The following materials would be helpful:
Inserting Data Connections into a SharePoint Library
https://social.technet.microsoft.com/Forums/en-US/df79dce5-fd92-4506-af4e-11127cb0d655/inserting-data-connections-into-a-sharepoint-library?forum=sharepointdevelopment
Programmatically exporting reports from SQL 2012 Reporting Services
http://stackoverflow.com/questions/12199995/programmatically-exporting-reports-from-sql-2012-reporting-services
Report Server Web Service Endpoints
http://msdn.microsoft.com/en-us/library/ms155398(v=sql.110).aspx
Best Regards
Dennis Guo
TechNet Community Support

• New Effective CAL essay: How do I create an abstract data type in CAL?

(by calling Prelude.output, mutating, and then calling Prelude.input). The solution in this case is to not derive Inputable and Outputable instances, but rather to define a custom Inputable and Outputable instance that copies the underlying values.</p>

Hi Pandra801,
When you create a the external content type, please try to add a filter based on your select statement.
http://arsalkhatri.wordpress.com/2012/01/07/external-list-with-bcs-search-filters-finders/
Or, try to create a stored procedure based on your select statement, then create ECT using the SQL stored procedure.
A step by step guide in designing BCS entities by using a SQL stored procedure
http://blogs.msdn.com/b/sharepointdev/archive/2011/02/10/173-a-step-by-step-guide-in-designing-bcs-entities-by-using-a-sql-stored-procedure.aspx
I hope this helps.
Thanks,
Wendy
Wendy Li
TechNet Community Support

• It is necessary to create one header data for each file to be sent to CDFS.

hi GUYS
my sce anrio is FILE-XI-PROXY
REQUIREMENT IS
SOURCE FILE                      TARGET FILE WILL BE
H1                                             H1                        H1                    H1
I1                                               I1                         I2                      I3
I2                                                F1                        F1                    F1
I3
F1
It is necessary to create one header data for each file to be sent to TARGET. Each file will be related to only one SAP Company Code.
Thanks
NAG

aa

• Error creating a new Data Source for Oracle connection

I'm trying to create a new data source connection to our
Oracle 10gR2 server using ColdFusion Administrator 6.1 Standard on
a Windows 2003 server.
I created a System DSN ODBC connection for Oracle. I can use
the ODBC connection when connecting an Access db to Oracle but when
I try to use it w/ ColdFusion Admin it generates the following
error message:
Connection verification failed for data source: sitest2
Driver][ODBC Socket]internal error:
Driver's SQLAllocHandle on SQL_HANDLE_ENV failed
The root cause was that: java.sql.SQLException:
Driver's SQLAllocHandle on SQL_HANDLE_ENV failed
Any help or recommendations would be greatly appreciated.
Tina

The schema/user is system and the password is alpha-numeric, upper/lower case, no special char ...
As a workaround I was able to add the password to the entry in the datasources.xml file and restarted BI Pub.
The JDBC is working ... I can test the connection successfully ... just wont save the entry
Edited by: tread on Oct 17, 2011 11:55 AM

• Error While Creating  The Generic Data Source.

Hi Gurus,
I am trying to create a Generic Data Source (ZGG_TEST) on a View (ZV_TEST1)
View as Follows:
Table1 has the Following Fields
Field Type
MANDT CLNT
RECNO NUMC
STATUS CHAR
LMODF CHAR
Table2 has Fields
Fields Type
MANDT CLNT
RECNO NUMC
PHCOS QUAN
MATNR CHAR
EQSFS QUAN
MEINS UNIT
In Table2 under Currency and Quantity Field tab
For Field PHCOS The Reference table is MSEG and Reference Field is MEINS
For Field EQSFS the Reference Table is MSEG and reference field is MEINS
View Description
Tables:
Table1
Table2
MSEG
Join condition For the View is
TABLE2-MANDT=TABLE1-MANDT
TABLE2-RECNO=TABLE1-RECNO
TABLE2-MANDT=MSEG-MANDT
TABLE2-MATNR=MSEG-MATNR
The Problem is While saving the Data Source it is Giving an Error as Follows
Invalid extract structure template ZV_TEST1 of DataSource zgg_test
Message no. R8359
Diagnosis
You tried to generate an extract structure with the template structure zgg_test. This operation failed, because the template structure quantity fields or currency fields, for example, field PHCOS refer to a different table.
Procedure
Use the template structure to create a view or DDIC structure that does not contain the inadmissible fields.
Santosh

n Table2 under Currency and Quantity Field tab
For Field PHCOS The change Reference table to  TABLE2   For Field EQSFS the change the Reference Table to TABLE2
ref field MEINS ...
This works ..
Priya
Edited by: Priya on Dec 31, 2007 1:30 PM

• Runtime error while creating material master data

hello sir,
i am facing one prolem while creating MATERIAL MASTER DATA.
AFTER GIVING ALL REQUIRED INFORMATION WHEN I AM GOING TO SAVE THE DOCUMENT ITS SHOWING ABAP RUNTIME ERROR.
MESSAGE TYPE: - MDS_KEYMAP.
MESSAGE CLASS: 001.
PLEASE TELL ME WHAT TO DO?
REGARDS..