Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 How to use the CASE condition to change text in an Alma Analytics report Yoel Kortick Senior Librarian, Ex Libris.

Similar presentations


Presentation on theme: "1 How to use the CASE condition to change text in an Alma Analytics report Yoel Kortick Senior Librarian, Ex Libris."— Presentation transcript:

1 1 How to use the CASE condition to change text in an Alma Analytics report Yoel Kortick Senior Librarian, Ex Libris

2 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: http://www.exlibrisgroup.comhttp://www.exlibrisgroup.com

3 3 Agenda Introduction Example on textual values Example on numerical values

4 4 Introduction There may be cases where the actual text appearing in a report would be more appropriate as a different text. In other words, the text in a report appears as the data appears in Alma. However, to make the report “meaningful” it may be that certain strings of text should change to specific values. This may done by using the CASE parameter After the text is changed by CASE parameter the report may be grouped and totaled on the new text

5 5 Introduction First possible need for CASE: For example perhaps we have a report of all items in certain library and how many times they were loaned It may not really be important to see the exact number of times an item was loaned. Rather, a text such as “Less than 5 times” or “Between 5 and 10 times” or “More than ten times” may be more useful. We could then make a CASE to change the values.

6 6 Introduction Second possible need for CASE: Another example may be that we have a report of all items ordered from a certain vendor and how many days they arrived late (after the expected arrival date) Again, it may not really be important to see the exact number of days the items was late. Rather, a text such as “Less than 5 days” or “Between 5 and 10 days” or “More than ten days” may be more useful. We could then make a CASE to change the values.

7 7 Introduction Third possible need for CASE: Another example may be that we have a report of the number of loans per user group at each circulation desk It may not really be important to see the exact name of the circulation desk Rather, a text such as “Resource Sharing Desk” or “Regular Circ. Desk” may be more useful. We could make a CASE changing any desk which is not “Resource Sharing Desk” to “Regular Circ. Desk”

8 8 Introduction Fourth possible need for CASE: Another example may be that we still have the report of the number of loans per user group at each circulation desk It may not really be important to see the exact name of the user group Rather, a text such as “Staff” or “Student” may be more useful. We could make a CASE changing all groups which are some type of Staff to “Staff” and any group which is some type of student to “Student”

9 9 Agenda Introduction Example on textual values Example on numerical values

10 10 Example on textual values Here we have a report of number of loans by circulation desk and user group. We have one Resource Sharing Desk, two reading rooms, and several other libraries. We want to Leave “Resource Sharing Desk” as is Change “Reading Room 1” and “Reading Room 2” to “Reading Room” Change all others to “Standard Circulation Desk”

11 11 Example on textual values Note: If you copy and paste any values from here the apostrophes should be rewritten manually or error messages will occur Rewrite manually the “ and the ‘

12 12 Example on textual values Here is the report before using “CASE”

13 13 Example on textual values Then we will add the condition WHEN CASE "Loan Circulation Desk"."Circ Desk Name" The field we want to change is "Loan Circulation Desk"."Circ Desk Name“ Therefore the CASE string will start with: CASE "Loan Circulation Desk"."Circ Desk Name“ WHEN

14 14 Example on textual values And now with the actual conditions we want. If it is a textual field it needs a single quote. If it is a numerical field it does not need quotes. Start with something basic which will change ‘Reading Room 1’ to ‘Reading Room’ and everything else to ‘Standard Circulation Desk’ Put the formula under the column “Circ Desk Name’ by doing “edit formula”

15 15 Example on textual values CASE "Loan Circulation Desk"."Circ Desk Name” WHEN ‘Reading Room 1’ THEN ‘Reading Room’ ELSE ‘Standard Circulation Desk’ END

16 16 Example on textual values Now we have it working, and will begin to make the CASE also include ‘Reading Room 2’ and ‘Resource Sharing Desk’ CASE "Loan Circulation Desk"."Circ Desk Name" WHEN 'Reading Room 1' THEN 'Reading Room' WHEN 'Reading Room 2' THEN 'Reading Room' WHEN 'Resource Sharing Desk' THEN 'Resource Sharing Desk' ELSE 'Standard Circulation Desk' END

17 17 Example on textual values Now it appears as follows: We need to make this column narrower and give it a more relevant name

18 18 Example on textual values We will rename the column

19 19 Example on textual values We will rename the column

20 20 Example on textual values Here are the results

21 21 Example on textual values Before (without CASE)After (with CASE)

22 22 Agenda Introduction Example on textual values Example on numerical values

23 23 Example on numerical values Now we will make a CASE on the number of Loans We will group the loans into groups of 1-10, 10- 20, 20-30, etc. The formula is: CASE WHEN "Loan"."Loans" >= 1 AND "Loan"."Loans" <= 10 THEN '1-10' WHEN "Loan"."Loans" >= 11 AND "Loan"."Loans" <= 20 THEN '11-20' WHEN "Loan"."Loans" >= 21 AND "Loan"."Loans" <= 30 THEN '20-30' WHEN "Loan"."Loans" >= 31 AND "Loan"."Loans" <= 40 THEN '30-40' WHEN "Loan"."Loans" >= 41 AND "Loan"."Loans" <= 50 THEN '41-50' WHEN "Loan"."Loans" >= 51 AND "Loan"."Loans" <= 60 THEN '51-60' WHEN "Loan"."Loans" >= 61 AND "Loan"."Loans" <= 70 THEN '61-70' ELSE 70+' END

24 24 Example on numerical values Here it is after doing “Edit Formula on the field “Loans”

25 25 Example on numerical values Here are the results

26 26 Example on numerical values Before (without CASE)After (with CASE)

27 27 THANK YOU! xxxx.xxxx@exlibrisgroup.com


Download ppt "1 How to use the CASE condition to change text in an Alma Analytics report Yoel Kortick Senior Librarian, Ex Libris."

Similar presentations


Ads by Google