Presentation is loading. Please wait.

Presentation is loading. Please wait.

Yoel Kortick Senior Librarian

Similar presentations


Presentation on theme: "Yoel Kortick Senior Librarian"— Presentation transcript:

1 Yoel Kortick Senior Librarian
How to use the TIMESTAMPADD parameter to retrieve by today - X time in an Alma Analytics report Yoel Kortick Senior Librarian

2 Copyright Statement and Disclaimer
CONFIDENTIAL INFORMATION The information herein is the property of Ex Libris Ltd. or its affiliates and any misuse or abuse will result in economic loss. DO NOT COPY UNLESS YOU HAVE BEEN GIVEN SPECIFIC WRITTEN AUTHORIZATION FROM EX LIBRIS LTD. This document is provided for limited and restricted purposes in accordance with a binding contract with Ex Libris Ltd. or an affiliate. The information herein includes trade secrets and is confidential. DISCLAIMER The information in this document will be subject to periodic change and updating. Please confirm that you have the most current documentation. There are no warranties of any kind, express or implied, provided in this documentation, other than those expressly agreed upon in the applicable Ex Libris contract. This information is provided AS IS. Unless otherwise agreed, Ex Libris shall not be liable for any damages for use of this document, including, without limitation, consequential, punitive, indirect or direct damages. Any references in this document to third-party material (including third-party Web sites) are provided for convenience only and do not in any manner serve as an endorsement of that third-party material or those Web sites. The third-party materials are not part of the materials for this Ex Libris product and Ex Libris has no liability for such materials. TRADEMARKS "Ex Libris," the Ex Libris Bridge to Knowledge , Primo, Aleph, Voyager, SFX, MetaLib, Verde, DigiTool, Rosetta, bX, URM, Alma , and other marks are trademarks or registered trademarks of Ex Libris Ltd. or its affiliates. The absence of a name or logo in this list does not constitute a waiver of any and all intellectual property rights that Ex Libris Ltd. or its affiliates have established in any of its products, features, or service names or logos. Trademarks of various third-party products, which may include the following, are referenced in this documentation. Ex Libris does not claim any rights in these trademarks. Use of these marks does not imply endorsement by Ex Libris of these third-party products, or endorsement by these third parties of Ex Libris products. Oracle is a registered trademark of Oracle Corporation. UNIX is a registered trademark in the United States and other countries, licensed exclusively through X/Open Company Ltd. Microsoft, the Microsoft logo, MS, MS-DOS, Microsoft PowerPoint, Visual Basic, Visual C++, Win32, Microsoft Windows, the Windows logo, Microsoft Notepad, Microsoft Windows Explorer, Microsoft Internet Explorer, and Windows NT are registered trademarks and ActiveX is a trademark of the Microsoft Corporation in the United States and/or other countries. Unicode and the Unicode logo are registered trademarks of Unicode, Inc. Google is a registered trademark of Google, Inc. Web address: Background example We also need a white background option

3 Agenda Introduction Applying the TIMESTAMPADD filter on transaction date Applying the TIMESTAMPADD filter on loan date

4 Introduction There may be cases where the library is creating a report and does not want to “hard code” a date. For example the library may not want to know which items arrived from Sept. 06 – 12, but instead want to know which items arrived in the last week. Similarly, the library may wish to know how many loans were made by users of group “Undergraduate” in the past year.

5 Introduction By using a variable which controls the date the report is “dynamic” in that any time it is opened it automatically retrieves by the current date minus a certain amount of days, weeks, months or years. The variable is called TIMESTAMPADD Thus weekly reports may be called, for example, “Number of … in the last week”

6 Agenda Introduction Applying the TIMESTAMPADD filter on transaction date Applying the TIMESTAMPADD filter on loan date

7 Applying the TIMESTAMPADD filter on transaction date
Here is a report with transaction of type expenditure with amount, vendor and date

8 Applying the TIMESTAMPADD filter on transaction date
Here is a report with transaction of type expenditure with amount, vendor and date

9 Applying the TIMESTAMPADD filter on transaction date
Create any filter on the transaction date

10 Applying the TIMESTAMPADD filter on transaction date
Select “Convert to SQL” and click OK

11 Applying the TIMESTAMPADD filter on transaction date
Now we see that we have: "Transaction Date"."Transaction Date" = We need to change this to reflect the kind of date retrieval we want

12 Applying the TIMESTAMPADD filter on transaction date
If we want all transactions in the last 14 days: "Transaction Date"."Transaction Date" >= TIMESTAMPADD(SQL_TSI_DAY, -14, CURRENT_DATE) If we want all transactions in the last 2 years: "Transaction Date"."Transaction Date" >= TIMESTAMPADD(SQL_TSI_YEAR, -2, CURRENT_DATE) If we want all transactions in the last 3 months: "Transaction Date"."Transaction Date" >= TIMESTAMPADD(SQL_TSI_MONTH, -3, CURRENT_DATE) If we want all transactions in the last 1 week: "Transaction Date"."Transaction Date" >= TIMESTAMPADD(SQL_TSI_WEEK, -1, CURRENT_DATE) If we want all dates between today and 1 month from now: "Borrower Details"."Expiry Date" BETWEEN (CURRENT_DATE) AND TIMESTAMPADD(SQL_TSI_MONTH, +1, CURRENT_DATE)

13 Applying the TIMESTAMPADD filter on transaction date
For example here we will get all transactions in the past six months:

14 Applying the TIMESTAMPADD filter on transaction date
Here we have transactions for the last six months

15 Agenda Introduction Applying the TIMESTAMPADD filter on transaction date Applying the TIMESTAMPADD filter on loan date

16 Applying the TIMESTAMPADD filter on loan date
Now the library will make a report of the total amount of loans made at a circulation desk of the main library within different time spans This will include In the last week In the last month In the last year

17 Applying the TIMESTAMPADD filter on loan date
Here we have a report of all loans made at a circulation desk of the main library

18 Applying the TIMESTAMPADD filter on loan date
The output gives each loan for each time

19 Applying the TIMESTAMPADD filter on loan date
In order to use the timestamp add we will do “Filter > Convert to SQL” on the "Loan Date"."Date Key“ and change as follows: If we want all loans made in the last 14 days: "Loan Date"."Date Key" >= TIMESTAMPADD(SQL_TSI_DAY, -14, CURRENT_DATE) If we want all loans made in the last 2 years: "Loan Date"."Date Key" >= TIMESTAMPADD(SQL_TSI_YEAR, -2, CURRENT_DATE) If we want all loans made in the last 3 months: "Loan Date"."Date Key" >= TIMESTAMPADD(SQL_TSI_MONTH, -3, CURRENT_DATE) If we want all loans made in the last 1 week: "Loan Date"."Date Key" >= TIMESTAMPADD(SQL_TSI_WEEK, -1, CURRENT_DATE)

20 Applying the TIMESTAMPADD filter on loan date
It is also possible to define a filter for a date to start at the beginning of ‘X’ previous months. For example, “2 months ago beginning with the first of the month” If today is Sept. 18 then this will give since Aug. 1 "Loan Date"."Date Key" >= TIMESTAMPADD(SQL_TSI_MONTH, -1, TIMESTAMPADD( SQL_TSI_DAY , DAYOFMONTH( CURRENT_DATE) * -(1) + 1, CURRENT_DATE)) If today is Sept. 18 then this will give since July. 1 "Loan Date"."Date Key" >= TIMESTAMPADD(SQL_TSI_MONTH, -2, TIMESTAMPADD( SQL_TSI_DAY , DAYOFMONTH( CURRENT_DATE) * -(1) + 1, CURRENT_DATE))

21 Applying the TIMESTAMPADD filter on loan date
Here for example is a filter retrieving the loans made in the last week

22 Applying the TIMESTAMPADD filter on loan date
What most interests the person viewing the report is not the specific barcodes but rather the total amount. So we add a “Performance tile”

23 Applying the TIMESTAMPADD filter on loan date
We can then move the performance tile to the top and if desired remove the table with the specific barcodes.

24 Applying the TIMESTAMPADD filter on loan date
Now the library has a report with the number of loans made in the last week and the filter will never need to be changed. It will always show the last week.

25 Other date filters It is also possible to define a filter the current year. Not “one year ago” but rather “the current year”. If today is Sept. 02, 2015 then it will start at Jan. 01, 2015 YEAR("Physical Item Details"."Receiving Date") = YEAR(CURRENT_DATE)

26 Other date filters It is also possible to define a filter the current month. Not “one month ago” but rather “the current month”. If today is Sept. 02, 2015 then it will start at Sept. 01, 2015 MONTH("Physical Item Details"."Receiving Date") = MONTH(CURRENT_DATE) But we will not want all cases of receiving month Sept. In that case we would get all years where the month is Sept. We will want receiving month current month and receiving year current year

27 YEAR("Physical Item Details"."Receiving Date")
Other date filters It is also possible to display from the date just the year, or just the month, or just the day YEAR("Physical Item Details"."Receiving Date") MONTH("Physical Item Details"."Receiving Date") DAY("Physical Item Details"."Receiving Date")

28 Other date filters

29 To retrieve by date of entire previous year
Other date filters To retrieve by date of entire previous year YEAR("Physical Item Details"."Receiving Date") = YEAR(CURRENT_DATE) To retrieve by date of entire previous month YEAR("PO Line"."Receiving Date (Latest in POL)") = YEAR(CURRENT_DATE) AND MONTH("PO Line"."Receiving Date (Latest in POL)") = (extract(month from current_date)-1)) To retrieve by date of entire previous week YEAR("PO Line"."Receiving Date (Latest in POL)") = YEAR(CURRENT_DATE) AND WEEK("PO Line"."Receiving Date (Latest in POL)") = WEEK(CURRENT_DATE)-1

30 THANK YOU! Yoel.Kortick@exlibrisgroup.com
Check out public segmentations 30 30


Download ppt "Yoel Kortick Senior Librarian"

Similar presentations


Ads by Google