user guide hq-02: creating a quarterly deferred ... › refuges › facilities › pdfs ›...

19
User Guide HQ-02: Creating a Quarterly Deferred Maintenance Backlog Report Page 1 Background The Quarterly Deferred Maintenance Backlog Report is created from the SAMMS production database after it’s archived at the end of each Fiscal Quarter; this is necessary so that the data retrieved from the archived database remains constant. There are two tables created from the raw data from this report. The FWS DM&R tab shows the estimated replacement costs for General Plants Property and Equipment, Heritage Assets, and Stewardship Land; and evaluates the lesser of the sum of the estimated labor costs + estimated materials cost + estimated tools cost vs. the grand replacement cost. If the sums of the estimated costs are greater than the grand replacement cost that tells management we have bad data for that record—it also lets management know the actual and percentage change from quarter to quarter. The FWS DM&R by Asset Class tab does the same thing as the first table, but breaks down the categories further and also does not show the changes from quarter to quarter. Within each category mentioned above there is a further breakdown for the following: 1. Roads, Bridges and Trails; 2. Irrigation, Dams, and Other Water Structures; 3. Buildings (e.g., Administration, Education, Housing, Historic Buildings); and 4. Other Structures (e.g., Recreation Sites, Hatcheries, etc.). Process Section Using Macros In order for the Macros to work the user must have 32 bit Oracle client installed on his machine. Macros have been developed to enable the backlog report to be created quickly and accurately—they call functions that have been created in the MAXIMO schema; all the function names begin with BACKLOG_GET_. The sections that discuss using macros will be written in blue. In order to run the macros go to Developer Macros where you will see something like the diagram below. Run the RunAll macro by choosing it and clicking Run. This will automatically populate the following tabs: FWS DM&R, FWS DM&R by Asset Class, Quick Reference, Executive Quick Reference, Greenbook, Budget Finance Numbers and Percentage of Investment.

Upload: others

Post on 27-Jun-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: User Guide HQ-02: Creating a Quarterly Deferred ... › refuges › facilities › pdfs › HQ-02...2018/09/28  · User Guide HQ-02: Creating a Quarterly Deferred Maintenance Backlog

User Guide HQ-02: Creating a Quarterly Deferred Maintenance Backlog Report

Page 1

Background The Quarterly Deferred Maintenance Backlog Report is created from the SAMMS production database after it’s archived at the end of each Fiscal Quarter; this is necessary so that the data retrieved from the archived database remains constant. There are two tables created from the raw data from this report.

The FWS DM&R tab shows the estimated replacement costs for General Plants Property and Equipment, Heritage Assets, and Stewardship Land; and evaluates the lesser of the sum of the estimated labor costs + estimated materials cost + estimated tools cost vs. the grand replacement cost. If the sums of the estimated costs are greater than the grand replacement cost that tells management we have bad data for that record—it also lets management know the actual and percentage change from quarter to quarter.

The FWS DM&R by Asset Class tab does the same thing as the first table, but breaks down the categories further and also does not show the changes from quarter to quarter. Within each category mentioned above there is a further breakdown for the following:

1. Roads, Bridges and Trails; 2. Irrigation, Dams, and Other Water Structures; 3. Buildings (e.g., Administration, Education, Housing, Historic Buildings); and 4. Other Structures (e.g., Recreation Sites, Hatcheries, etc.).

Process Section

• Using Macros

In order for the Macros to work the user must have 32 bit Oracle client installed on his machine. Macros have been developed to enable the backlog report to be created quickly and accurately—they call functions that have been created in the MAXIMO schema; all the function names begin with BACKLOG_GET_. The sections that discuss using macros will be written in blue. In order to run the macros go to Developer Macros where you will see something like the diagram below. Run the RunAll macro by choosing it and clicking Run. This will automatically populate the following tabs: FWS DM&R, FWS DM&R by Asset Class, Quick Reference, Executive Quick Reference, Greenbook, Budget Finance Numbers and Percentage of Investment.

Page 2: User Guide HQ-02: Creating a Quarterly Deferred ... › refuges › facilities › pdfs › HQ-02...2018/09/28  · User Guide HQ-02: Creating a Quarterly Deferred Maintenance Backlog

User Guide HQ-02: Creating a Quarterly Deferred Maintenance Backlog Report

Page 2

Before running the macros create a 32 bit DSN in ODBC Data Sources by going to: All Programs Administrative tools Data Sources (ODBC).

A 32 bit DSN called SAMMSHIST has been created which is used in all the macros that access the database.

In the connect procedure shown below the User Id and Password shown in boldface will need to be changed. Generally, it’s SAMMSQ followed by the quarter and the last two characters of the fiscal year. The User Id is uppercase and the Password is lower case. Public Sub Connect() Set con = New ADODB.Connection Set rs = New ADODB.Recordset

Page 3: User Guide HQ-02: Creating a Quarterly Deferred ... › refuges › facilities › pdfs › HQ-02...2018/09/28  · User Guide HQ-02: Creating a Quarterly Deferred Maintenance Backlog

User Guide HQ-02: Creating a Quarterly Deferred Maintenance Backlog Report

Page 3

'---Connecting to the Data Source--- con.Open ("User ID=SAMMSQ118;Password=sammsq118;Data Source=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=ifw9r-12orarep.fws.doi.net)(PORT = 2022))(CONNECT_DATA=(SERVER=dedicated)(SERVICE_NAME=samshist.fws.doi.net)));Provider=OraOLEDB.Oracle;") End Sub *Every quarter change the UID (User Id) and PWD (password)—to do this go into Excel, click on Developer Macros Connect Edit as shown below.

You also need to change the Header information in the Headers module which you access similar to the way you Connect module. Click on Developer Macros Headers Edit Only the information shown in boldface will need to be changed. Sub Headers() Header = "FY 2018 4th Quarter Report" Header1 = "As of September 30, 2018" Header2 = "Deferred Maintenance and Repairs as of September 30, 2018" Sheets("All FWS").Range("A1") = Header Sheets("All NWRS").Range("A1") = Header Sheets("Quick Reference").Range("A1") = Header Sheets("Executive Quick Reference").Range("A1") = Header Sheets("Percentage of Investment").Range("A1") = Header Sheets("FWS DM&R by Asset Class").Range("A6") = Header1 Sheets("Greenbook").Range("A2") = Header1 Sheets("FWS DM&R").Range("A5") = Header2 End Sub

Page 4: User Guide HQ-02: Creating a Quarterly Deferred ... › refuges › facilities › pdfs › HQ-02...2018/09/28  · User Guide HQ-02: Creating a Quarterly Deferred Maintenance Backlog

User Guide HQ-02: Creating a Quarterly Deferred Maintenance Backlog Report

Page 4

Now you’re ready to use the Macros. • Create a schema in the SAMMSHIST database on the IFW9ANRS-REPDB8 Server—

the naming convention for the schema is SAMMSQ<quarter>two digit fiscal year> (e.g., SAMMSQ416).

• Copy the MAXIMO schema from the FWSPROD7 database on the IFW9ANRS-MX7DB1 Server to the schema that you just created.

• Enter Toad, logging into the schema you created and run the first SELECT statement in backlog.sql, which is located at S:\Div Fac, Eq & Trans\Facilities and Equipment\DM-Backlog-FCI Quarterly Reports and save it into a spreadsheet.

• Make a copy of the spreadsheet that you used for the previous quarter and rename it to FWS FY_<FY>_<nth> Quarter Backlog Report.xlsx

• Delete the data in the All FWS tab that you renamed, then copy the information from the spreadsheet that you created from Toad into that tab; then change the top row to the appropriate FY and Quarter.

• Filter the top 2 rows—Click to the left of the 3rd row and go to Home Sort & Filter Filter; then go to View Freeze Panes Freeze Panes.

1. Make the ADJUSTED_DM column red.

2. Insert a column to the left of the ADJUSTED_DM column.

Page 5: User Guide HQ-02: Creating a Quarterly Deferred ... › refuges › facilities › pdfs › HQ-02...2018/09/28  · User Guide HQ-02: Creating a Quarterly Deferred Maintenance Backlog

User Guide HQ-02: Creating a Quarterly Deferred Maintenance Backlog Report

Page 5

3. Name that column ADJ FCI. 4. In the first row below the column header (without all spaces) enter the following formula:

=IF(I3<>0,K3/I3,0)—which means, that if the GRANDREPLACE column does not equal 0, then divide the ADJUSTED_DM by the GRANDREPLACE column…otherwise set it equal to 0; the reasoning is that you cannot divide by 0 obviously.

5. Drag that formula using the lower left of the cell to the end of the column until there are

no more rows with data.

6. Color the column red as shown above. 7. Right click the column header and choose Format cells.

Page 6: User Guide HQ-02: Creating a Quarterly Deferred ... › refuges › facilities › pdfs › HQ-02...2018/09/28  · User Guide HQ-02: Creating a Quarterly Deferred Maintenance Backlog

User Guide HQ-02: Creating a Quarterly Deferred Maintenance Backlog Report

Page 6

8. Choose Number and two decimal places.

9. The values in that column will change.

• Delete the All NWRS tab. Filter the All FWS tab by Program = NWRS and copy the results into the All NWRS tab. Filter and freeze the top row of the All NWRS tab (just as you did for the All FWS tab).

• Copy and paste the contents under the Ending DM&R Balance into Beginning DM&R Balance—Do not delete any formulas! Change the date shown from the end of the last quarter to the end of this quarter.

• In the FWS DM&R by Asset Class tab Clear Contents all the numbers that are not calculated—Do not delete any formulas! Change the date shown from the end of the last quarter to the end of this quarter.

• Enter data into the DM&R Report by Asset Class tab. 1. With Macros. Go to Developer Macros and run Clear Data. Then run DMR_Asset_Class.

This completely fills in the FWS DM&R by Asset Class and FWS DM&R tabs. If you run these macros do not go to 2. You are done with these tabs.

Page 7: User Guide HQ-02: Creating a Quarterly Deferred ... › refuges › facilities › pdfs › HQ-02...2018/09/28  · User Guide HQ-02: Creating a Quarterly Deferred Maintenance Backlog

User Guide HQ-02: Creating a Quarterly Deferred Maintenance Backlog Report

Page 7

2. Run the functions under -- Get DM for PPETYPE and CFOTYPE in backlog.sql and put the

results in the appropriate cells. For example the results of SELECT BACKLOG_GET_ADJUSTED_DM_ASSET ('General','Roads Bridges and Trails') FROM

DUAL; would be placed in the General PP&E row and Roads, Bridges, and Trails column as shown below.

• Data from the DM&R Report by Asset Class tab is automatically inserted into the FWS DM&R tab (e.g., the total below General PP&E is automatically inserted into the intersection of the Ending DM&R Balance column and General PP&E row).

Page 8: User Guide HQ-02: Creating a Quarterly Deferred ... › refuges › facilities › pdfs › HQ-02...2018/09/28  · User Guide HQ-02: Creating a Quarterly Deferred Maintenance Backlog

User Guide HQ-02: Creating a Quarterly Deferred Maintenance Backlog Report

Page 8

• Executive Quick Reference and Quick Reference tabs. 1. With Macros run the Quick_Reference macro. This fills in everything in the Quick Reference

tab except for Number Assets w/ Deferred Maintenance. In order to complete this tab go to # 9 below and follow the directions. Do not do anything else in this bullet.

2. In the Quick Reference tab Clear Contents the hard coded information—Do not delete any formulas!

3. In the Executive Quick Reference do not delete anything…everything in this tab is calculated from the Quick Reference tab.

4. There are a number of functions and SQL statements that have been set up for the Quick Reference tab. To fill in Total Number Assets Owned or Managed we run the functions under Total Assetts owned or managed. Two examples below fill in the cells circled in red—

the first one fills in the Total Assets for Building and the second does the same for Structures.

SELECT BACKLOG_GET_ASSET_COUNT ('NWRS','Building') FROM DUAL; SELECT BACKLOG_GET_ASSET_COUNT ('NWRS','Structure') FROM DUAL;

Page 9: User Guide HQ-02: Creating a Quarterly Deferred ... › refuges › facilities › pdfs › HQ-02...2018/09/28  · User Guide HQ-02: Creating a Quarterly Deferred Maintenance Backlog

User Guide HQ-02: Creating a Quarterly Deferred Maintenance Backlog Report

Page 9

5. To fill in the Total Sqft column run the functions under -- Total SIZEA. In this case, only run the function for buildings since it’s N/A for Structures; the result of this function is circled in blue above.

SELECT BACKLOG_GET_SIZEA ('NWRS','Building') FROM DUAL;

6. To fill in the Current Replacement Value (S millions) column (CRV), run the functions under -- Total CRV. Two examples below fill in the cells circled in green—

the first one fills in the CRV for Building and the second does the same for Structures.

SELECT BACKLOG_GET_CRV ('NWRS','Building') FROM DUAL; SELECT BACKLOG_GET_CRV ('NWRS','Structure') FROM DUAL;

7. To fill in the Total Deferred Maintenance ($ millions) (DM) run the functions under -- Adjusted DM. Two examples below fill in the cells circled in purple—

the first one fills in the DM for Building and the second does the same for Structures.

SELECT BACKLOG_GET_ADJUSTED_DM ('NWRS','Building') FROM DUAL; SELECT BACKLOG_GET_ADJUSTED_DM ('NWRS','Structure') FROM DUAL;

8. To fill in the Number of Heritage Assets run the functions under -- Heritage Criteria. Two examples below fill in the cells circled in yellow—the first one fills in the Heritage Assets for Building and the second does the same for Structures.

SELECT BACKLOG_GET_HERITAGE ('NWRS','Building') FROM DUAL; SELECT BACKLOG_GET_HERITAGE ('NWRS','Structure') FROM DUAL;

9. To fill in the Number Assets w/Deferred Maintenance go to the All FWS tab in the spreadsheet. To fill in the appropriate column choose the Program, the CFOTYPE, and the Adjusted DM > than 0 to get the appropriate answer (i.e., choose NWRS as the Program and Structures for the CFOTYPE). To do this choose NWRS in the spreadsheet as shown below:

Page 10: User Guide HQ-02: Creating a Quarterly Deferred ... › refuges › facilities › pdfs › HQ-02...2018/09/28  · User Guide HQ-02: Creating a Quarterly Deferred Maintenance Backlog

User Guide HQ-02: Creating a Quarterly Deferred Maintenance Backlog Report

Page 10

In order to choose Structures under CFOTYPE choose everything but Buildings as shown below:

Under Adjusted DM choose all the non-zero values as shown below:

Now the answer is found in the lower left hand corner of the spreadsheet as shown below, notice the 4145 corresponds to the number circled in dark red above in the spreadsheet:

Page 11: User Guide HQ-02: Creating a Quarterly Deferred ... › refuges › facilities › pdfs › HQ-02...2018/09/28  · User Guide HQ-02: Creating a Quarterly Deferred Maintenance Backlog

User Guide HQ-02: Creating a Quarterly Deferred Maintenance Backlog Report

Page 11

10. Use the SQL statement below to fill in the Total Number Assets Owned or Managed, Total Sqft, and Current Replacement Value ($ millions) for Levees, Dams or Roads. The SQL is below under Assets owned or managed, SIZEA, CRV in backlog.sql.

SELECT COUNT(LOCATIONS.LOCATION) As Assets, SUM(LOCATIONS.SIZEA) As SizeA, SUM(nvl(GRANDREPLACE,0)/1000000) AS CRV FROM (LOCATIONS LEFT OUTER JOIN ASSETCOD ON LOCATIONS.ASSETCODE=ASSETCOD.ASSETCODE) WHERE LOCATIONS.TYPE='RPI' AND LOCATIONS.STATUS='OPERATING' --AND LOCATIONS.Program='NWRS' --AND LOCATIONS.Program='NCTC' --AND LOCATIONS.Program='NFHS' --AND LOCATIONS.Program='AES' --AND LOCATIONS.Program='COLE' --AND ASSETCOD.ASSETCODE='40162300' -- Levees --AND ASSETCOD.ASSETCODE IN ('40161900','40162000') --Dams --AND ASSETCOD.ASSETCODE IN ('40760100','40760200', '40760300') --Roads

The SELECT, FROM and WHERE clauses are always used. The appropriate AND clauses are uncommented depending upon which row is being filled. If the information for Levees under NWRS is needed, uncomment AND LOCATIONS.Program='NWRS' and AND ASSETCOD.ASSETCODE='40162300'; then run the following statement:

SELECT COUNT(LOCATIONS.LOCATION) As Assets, SUM(LOCATIONS.SIZEA) As SizeA, SUM(nvl(GRANDREPLACE,0)/1000000) AS CRV FROM (LOCATIONS LEFT OUTER JOIN ASSETCOD ON LOCATIONS.ASSETCODE=ASSETCOD.ASSETCODE) WHERE LOCATIONS.TYPE='RPI' AND LOCATIONS.STATUS='OPERATING' AND LOCATIONS.Program='NWRS AND ASSETCOD.ASSETCODE='40162300' -- Levees

Now fill in the spreadsheet below with the information returned from that statement, which is circled in red.

11. To find the number of Heritage Assets, use the SQL statement below and uncomment the appropriate Program and AssetCode as done previously; the SQL is below under Heritage assets for Levees, Dams or Roads in backlog.sql.

SELECT COUNT(*) FROM LOCATIONS LEFT OUTER JOIN ASSETCOD ON LOCATIONS.ASSETCODE=ASSETCOD.ASSETCODE WHERE LOCATIONS.TYPE='RPI' AND LOCATIONS.STATUS='OPERATING' --AND ASSETCOD.ASSETCODE IN ('40162300') -- Levees --AND ASSETCOD.ASSETCODE IN ('40161900','40162000')--Dams --AND ASSETCOD.ASSETCODE IN ('40760100','40760200', '40760300') --Roads --AND LOCATIONS.PROGRAM='NWRS' --AND LOCATIONS.Program='NCTC' --AND LOCATIONS.Program='NFHS' --AND LOCATIONS.Program='AES' --AND LOCATIONS.Program='COLE' AND (HISTORICCRITERIA IN ('1','2')) OR (HISTORICCRITERIA IN ('3','4', '5', '6') AND ASSETCOD.PPETYPE='Historic')

Page 12: User Guide HQ-02: Creating a Quarterly Deferred ... › refuges › facilities › pdfs › HQ-02...2018/09/28  · User Guide HQ-02: Creating a Quarterly Deferred Maintenance Backlog

User Guide HQ-02: Creating a Quarterly Deferred Maintenance Backlog Report

Page 12

To filter for Levees and NWRS the SQL would look like this: SELECT COUNT(*) FROM LOCATIONS LEFT OUTER JOIN ASSETCOD ON LOCATIONS.ASSETCODE=ASSETCOD.ASSETCODE WHERE LOCATIONS.TYPE='RPI' AND LOCATIONS.STATUS='OPERATING' AND ASSETCOD.ASSETCODE IN ('40162300') -- Levees AND LOCATIONS.PROGRAM='NWRS' AND (HISTORICCRITERIA IN ('1','2')) OR (HISTORICCRITERIA IN ('3','4', '5', '6') AND ASSETCOD.PPETYPE='Historic')

Now fill in the spreadsheet with the number heritage assets for the appropriate Programs and Asset Code(s), which is circled in blue below.

12. To find Total Deferred Maintenance, use the SQL statement below and uncomment the appropriate Program and Adjusted DM for Levees, Dams or in backlog.sql.

SELECT NVL(ROUND(SUM(CASE WHEN ROUND(SUM(CASE WHEN WORKORDER.SUBWORKTYPE IN ('DMCM','DMRP','DMRH','DMCR','DMDE','DMEG','DMRM') AND WORKORDER.STATUS='WAPPR' THEN WORKORDER.ESTMATCOST + WORKORDER.ESTLABCOST + WORKORDER.ESTTOOLCOST ELSE 0 END), 0) > GRANDREPLACE THEN GRANDREPLACE ELSE ROUND(SUM(CASE WHEN WORKORDER.SUBWORKTYPE IN ('DMCM','DMRP','DMRH','DMCR','DMDE','DMEG','DMRM') AND WORKORDER.STATUS='WAPPR' THEN WORKORDER.ESTMATCOST + WORKORDER.ESTLABCOST + WORKORDER.ESTTOOLCOST ELSE 0 END), 0) END)/1000000,0),0) FROM (LOCATIONS LOCATIONS LEFT OUTER JOIN ASSETCOD ASSETCOD ON LOCATIONS.ASSETCODE=ASSETCOD.ASSETCODE) LEFT OUTER JOIN WORKORDER WORKORDER ON LOCATIONS.LOCATION=WORKORDER.LOCATION WHERE LOCATIONS.TYPE='RPI' AND LOCATIONS.STATUS='OPERATING' AND ASSETCOD.ASSETCODE IN ('40162300') --AND ASSETCOD.ASSETCODE IN ('40161900','40162000')--Dams --AND ASSETCOD.ASSETCODE IN ('40760100','40760200', '40760300') --Roads AND LOCATIONS.PROGRAM LIKE 'NWRS' --AND LOCATIONS.Program='NCTC' --AND LOCATIONS.Program='NFHS' --AND LOCATIONS.Program='AES' --AND LOCATIONS.Program='COLE' GROUP BY LOCATIONS.LOCATION, LOCATIONS.GRANDREPLACE

The code above is already filtered for Levees and NWRS; the appropriate cell in purple is circled below.

13. Fill in the number of assets with deferred maintenance the same way as described above, except, filter for the appropriate asset code, which for Levees is 40162300; the information is circled in purple below.

Page 13: User Guide HQ-02: Creating a Quarterly Deferred ... › refuges › facilities › pdfs › HQ-02...2018/09/28  · User Guide HQ-02: Creating a Quarterly Deferred Maintenance Backlog

User Guide HQ-02: Creating a Quarterly Deferred Maintenance Backlog Report

Page 13

14. In the cells below the number of assets over 50 years old is the only information needed— There are 7 SQL statements that get that information under the Assets over 50 years old heading in backlog.sql; simply run those statements and fill in the appropriate cells circled in red.

Page 14: User Guide HQ-02: Creating a Quarterly Deferred ... › refuges › facilities › pdfs › HQ-02...2018/09/28  · User Guide HQ-02: Creating a Quarterly Deferred Maintenance Backlog

User Guide HQ-02: Creating a Quarterly Deferred Maintenance Backlog Report

Page 14

• On the Greenbook tab, o With Macros run the Greenbook macro. If you run this macro do not do anything else in

this tab. o Clear contents all the information that is not a formula. The information for this tab is

gotten directly from the All FWS tab. If interested in the NWRS Portfolio of Constructed Facility Assets, go to the All FWS tab and filter PROGRAM for NWRS, and then CFOTYPE for Building. If interested in Servicewide Portfolio of FWS Constructed Facility Assets, go to the All FWS tab and only filter for CFOTYPE. Below shows that the filters are: Program = NWRS and CFOTYPE = Building. In the lower left hand corner of the All FWS tab you will get the count. Below shows the count for All the Buildings in NWRS.

. The information has been placed in the area circled in red in the Greenbook tab shown below. If we had not filtered for Program = NWRS the information would have been placed in the area shown in blue below. The replacement value is shown by going to the CRV column and doing an AutoSum; then divide the answer by 1,000,000 and place it in the area shown in green below using Paste 123. If we didn’t filter for Program=NWRS we would’ve placed the answer in the area in light green below. Do the same process for Deferred Maintenance; then answers are put in the cells in purple and yellow as below shows.

Page 15: User Guide HQ-02: Creating a Quarterly Deferred ... › refuges › facilities › pdfs › HQ-02...2018/09/28  · User Guide HQ-02: Creating a Quarterly Deferred Maintenance Backlog

User Guide HQ-02: Creating a Quarterly Deferred Maintenance Backlog Report

Page 15

• Budget Finance Numbers tab. This needs to be done annually. Only the numbers in yellow in the screen below need to be filled in.

Page 16: User Guide HQ-02: Creating a Quarterly Deferred ... › refuges › facilities › pdfs › HQ-02...2018/09/28  · User Guide HQ-02: Creating a Quarterly Deferred Maintenance Backlog

User Guide HQ-02: Creating a Quarterly Deferred Maintenance Backlog Report

Page 16

Below are the queries that need to be run for each of the rows below. The results of the last two queries should be added together. The yellow column to the left takes PROGRAM=’NWRS’. This needs to be changed to PROGRAM=’NFHS’ in order to get the results for the yellow column to the right.

--Budget Finance tab SELECT SUM(SIZEA) FROM LOCATIONS WHERE PROGRAM='NFHS' AND ASSETCODE IN ('40760100','40760200','40760300'); -- Roads Lane Miles SELECT COUNT(*) FROM LOCATIONS WHERE PROGRAM='NFHS' AND ASSETCODE IN ('40760500','40760700'); -- Bridges SELECT COUNT(*) FROM LOCATIONS WHERE PROGRAM='NFHS' AND ASSETCODE IN ('35300200','35300300','35310000'); -- Housing Quarters SELECT COUNT(*) FROM LOCATIONS WHERE PROGRAM='NFHS' AND ASSETCODE IN ('40161900','40162000'); -- Dams SELECT SUM(SIZEB)/5280 FROM LOCATIONS WHERE PROGRAM='NFHS' AND ASSETCODE IN ('40751100','40751000'); -- Traila (miles) -- The two queries below need to be added together SELECT SUM(SIZEB) FROM LOCATIONS WHERE PROGRAM='NFHS' AND ASSETCODE IN ('40750100'); -- Camposites

SELECT SUM(SIZEA) FROM LOCATIONS WHERE PROGRAM='NWRS' AND ASSETCODE IN ('40800800'); -- Mobil Home Pads

• Deferred Maintenance tab. Copy the information from a Deferred Maintenance tab from a previous quarter; if this is being done for the end of the FY add the information. As in the screen shot example below, add the information from the beginning of FY 2018 when running the report for September 30, 2017.

Page 17: User Guide HQ-02: Creating a Quarterly Deferred ... › refuges › facilities › pdfs › HQ-02...2018/09/28  · User Guide HQ-02: Creating a Quarterly Deferred Maintenance Backlog

User Guide HQ-02: Creating a Quarterly Deferred Maintenance Backlog Report

Page 17

• Past DM&R tab. Copy the information from a Past DM&R tab from a previous quarter; if this is being

done for the end of the FY add the information. As in the screen shot example below, add the information for FY 2017 when running the report for September 30, 2017.

• Past Greenbook tab. Copy the information from a Past Greenbook tab from a previous quarter; if this is being done for the end of the FY add the information. As in the screen shot example below, add the information for FY 2017 when running the report for September 30, 2017.

• Percentage of Investment tab.

Page 18: User Guide HQ-02: Creating a Quarterly Deferred ... › refuges › facilities › pdfs › HQ-02...2018/09/28  · User Guide HQ-02: Creating a Quarterly Deferred Maintenance Backlog

User Guide HQ-02: Creating a Quarterly Deferred Maintenance Backlog Report

Page 18

o With Macros run the PercentageOfInvestment macro; this fills in the Percentage of Investment tab. Be sure to check the results, because management occasionally changes the names of the Asset Code Description—if you are getting 0’s or blanks, check what the description was in the All FWS tab and make the substitution in the SQL that the macro call (e.g., Obs Decks Platforms Towers has been changed to Observation Deck Tower/Platform), so the parameter would have to change in the macro.

o Copy the information from a Percentage of Investment tab from a previous quarter and Clear Contents all the information under CRV and DM that is not a formula. Do not delete the information under Percentage or AssetCode! To enter information into the tabs that have been deleted, run the information under -- Get CRV for Assets and -- Get DM for Assets., and copy the information into a text editor; then copy and paste the answers into the appropriate cells. The SQL has been deliberately set up so that the order is the same as the order of the cells. Management occasionally changes the names of the Asset Code Description, so if you are getting 0’s or blanks be sure to check what the description was in the All FWS tab and make the substitution in the SQL (e.g., Obs Decks Platforms Towers has been changed to Observation Deck Tower/Platform), so the parameter would have to change. Below is some sample SQL for CRV and DM:

SQL for CRV SELECT BACKLOG_GET_CRV_FROM_ASSET('Bldg Multi-Purpose','%','%') FROM DUAL; SELECT BACKLOG_GET_CRV_FROM_ASSET('Bldg Office','%','%') FROM DUAL;

SQL for DM SELECT BACKLOG_GET_DM_FROM_ASSET('Bldg Multi-Purpose','%','%') FROM DUAL; SELECT BACKLOG_GET_DM_FROM_ASSET('Bldg Office','%','%') FROM DUAL;

• Pivot Table tab. Delete all the information in this tab. Go to the All FWS tab and copy all the information in the PROGRAM column and the ASDESCRIPTION into column H and I of the Pivot Table tab; click on those two columns and go to Insert Pivot Table. Click on Existing worksheet and fill in ‘Pivot Table’!$A:$B for Location (see screenshot below).

Page 19: User Guide HQ-02: Creating a Quarterly Deferred ... › refuges › facilities › pdfs › HQ-02...2018/09/28  · User Guide HQ-02: Creating a Quarterly Deferred Maintenance Backlog

User Guide HQ-02: Creating a Quarterly Deferred Maintenance Backlog Report

Page 19

The Pivot Table tab will now look like the example below. On the right hand side see Pivot Table fields. Drag the PROGRAM and ASDESCRIPTION fields beneath the rows column as you see in the blue oval below. Then drag the ASDESCRIPTION field from the top beneath Values. It will automatically choose Count as in the green oval below, that’s the correct value. The Pivot table is on your left, it gives you a count by ASDESCRIPTION and is summed by Program. Delete columns H and I and you are only left with the Pivot Table on your left.