I have three (3) records in the table:
LOB Effective Operating Cost CompanyID
T 2013-02 $75.00 0104
T 2013-08 $105.00 0104
T 2013-09 $95.00 0104
I want to create a formula fields to retreive certain record based on when the report is running.
Example: If I run the report for the month of October, I want to retrieve the most recent record, in this case, 2013-09. If I run the report for the month of September, I want to retrieve the record with effective date of 2013-09. If I run the report for the month of August, I want to retrieve the record with effective date of 2013-08, etc, etc...
Here is my formula fields:
IF ({RouteOperatingCost_vw_All.LineOfBusinss} = 'T') AND
(TONUMBER({RouteOperatingCost_vw_All.EffectivePeriod}) >= TONUMBER(TOTEXT({?StartDate},'yyyyMM')) AND
TONUMBER({RouteOperatingCost_vw_All.EffectivePeriod}) <= TONUMBER(TOTEXT({?EndDate},'yyyyMM'))) THEN
{RouteOperatingCost_vw_All.OperatingCostPerHour}
ELSE
0
This formula field does not do what I wanted to do.
Any help would be appreciate it.
Thanks!