168 65 6MB
English Pages 232 Year 2010
The Business Analyst's Guide to Oracle Hyperion Interactive Reporting 11
Quickly master this powerful business intelligence product
Edward J. Cody
professional expertise distilled
P U B L I S H I N G BIRMINGHAM - MUMBAI
The Business Analyst's Guide to Oracle Hyperion Interactive Reporting 11 Copyright © 2010 Packt Publishing All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews. Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book. Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information. First published: September 2010 Production Reference: 1010910 Published by Packt Publishing Ltd. 32 Lincoln Road Olton Birmingham, B27 6PA, UK. ISBN 978-1-849680-36-3 www.packtpub.com
Cover Image by Tina Negus ([email protected])
Credits
Author Edward J. Cody Reviewer Robert J. Fronzaglia
Editorial Team Leader Mithun Sehgal Project Team Leader Lata Basantani
Acquisition Editor
Project Coordinator
James Lumsden
Srimoyee Ghoshal
Development Editor Dhwani Devater Technical Editor Arun Nadar Indexer Monica Ajmera Mehta
Proofreaders Arani Roy Conrad Sardinha Production Coordinator Kruthika Bangera Cover Work Kruthika Bangera
About the Author Edward J. Cody is accomplished Data Warehouse and Business Intelligence consultant with over seven years of experience with Hyperion products. Mr. Cody was a speaker at Oracle OpenWorld 2008 on Essbase, and he has spoken at local user groups on ETL software. His experience with Interactive Reporting began with Brio v6 and has continued through the most recent version. He also has extensive experience with Essbase and Financial Reporting. Mr. Cody has consulted both private and Government organizations throughout his career. He has a Bachelor of Science in Systems Engineering from the George Washington University, School of Engineering and Applied Science, and he has a Master of Science in the Management of Information Technology from the University of Virginia, McIntire School of Commerce. His experience includes leading large Data Warehouse and Oracle Hyperion Business Intelligence projects, and he is currently leading an assessment of a major data warehouse and business intelligence initiative. He is well know for his efforts to aid clients in realizing their investment in business intelligence and a data warehouse through building well designed systems, leveraging automation, and reducing BI complexity. Mr. Cody has designed training programs on the software and decided to author a book on Oracle Hyperion Interactive Reporting after exposure to user feedback on the complexity of learning the product. He identiied that an introductory user guidebook on using the essential features of the software would be beneicial to all software users.
Acknowledgement I would irst like to start by thanking all of you who purchased this book. I hope that you ind it a good resource to aid you in your use with the product. I would also like to thank my parents (Ed & Cathy), brother (David), and all of my family and friends for working around my schedule as I wrote this book. I really appreciate your patience and understanding. I would like to thank all of my managers, peers, and employees that have supported me throughout my career. I would especially like to thank Dan Miller for providing me the opportunity to work in this ield. His efforts and the efforts of many others have helped me develop as a professional throughout my career. I must thank Bob Griesemer, author of the Oracle Warehouse Builder 11g: Getting Started, for setting me up with the opportunity to work with Packt Publishing. Bob is a good friend, colleague, and technical expert. His book is a great resource for all those interested in learning about Data Warehousing. I would also like to thank Bob Fronzaglia, the book's reviewer, for his contributions to the material. Bob has been a long time mentor and friend, and I thank him for his efforts. I must also thank James Lumsden and all of those at Packt Publishing for their efforts with the book. The team has worked tirelessly with me to produce a quality product and I thank them for all of their time and efforts.
About the Reviewer Robert J. Fronzaglia is an Operations Research Analysts in the Ofice of the Secretary Director (OSD), Cost Analysis and Program Evaluation. He is responsible for managing the Department of Defense (DoD) Resources Data Warehouse that contains DoD strategic resource data for budgeting, programming, acquisition, force structure, and manpower. Before joining OSD, Mr. Fronzaglia was a consultant with MPRI and AT&T Government Solutions where he provided analysis, data warehousing, and Activity-Based Costing support for various DoD organizations. Prior to that, he served in the U.S. Army for over 20 years as both a Field Artillery oficer and Comptroller. He served in staff, instructor, and command assignments in Europe, Southwest Asia, and the U.S. His military decorations include the Legion of Merit and Bronze Star. Mr. Fronzaglia holds a Bachelor of Science degree in Industrial Management from Gannon University, and a Masters in Business Administration from Syracuse University. Academic honors include being selected for the Beta Gamma Sigma National Honor Society for Scholastic Achievement and for Who's Who in American Universities and Colleges.
Table of Contents Preface Chapter 1: Oracle Hyperion Interactive Reporting
1 7
The Interactive Reporting document: The BQY The EPM Workspace Navigating the EPM Workspace Installing the Interactive Reporting Web Client Opening documents in the Workspace Opening documents from the local machine The Web Client interface The Section Catalogue Menus Toolbars Section Title Bar Status Bar Saving documents Saving documents to the Workspace Saving documents to the local machine Save options Password protecting the document Password protecting the design mode Ofline mode Importing BQY documents into the EPM Workspace Editing Interactive Reporting ile properties Summary
8 8 8 11 12 13 14 15 15 16 17 17 17 18 18 19 20 20 21 21 27 28
Chapter 2: The Query The Query section layout Sections window Section Title Bar Status Bar
29 30 30 30 31
Table of Contents
Working with pre-built data models Building a query Request items Removing request items Filters Filter interface Show Values Custom Values Manual entry Transfer values Loading ilters from a ile (importing) Modifying the AND and OR operators Variable ilters Filtering on request items Removing ilters Sorting Query processing Query options Identifying metadata (table and column remarks) Summary
Chapter 3: The Data Model
31 32 32 35 35 35 38 39 40 41 42 43 47 48 49 49 50 51 52 53
55
Creating a data model Duplicating a query Removing a query Building a data model The Elements window Adding tables to the data model Joins The Topic View Working with meta topics Creating meta topics Promoting to a meta topic Editing meta topics Changing the data model topic view Updating the data model Changing the table deinition Combining multiple queries in one model Local results Limitations of local results Derivable queries Limitations of derivable queries [ ii ]
56 57 57 57 58 58 59 61 61 62 65 65 66 67 68 69 69 70 70 71
Table of Contents
Importing external data Importing a ile Refreshing external data Importing tips
71 71 72 72
Fixing additional columns Fixing datatype and join issues
72 72
Importing custom SQL iles Refreshing imported SQL Summary
73 73 74
Chapter 4: Advanced Querying and Filtering Structured Query Language (SQL) How SQL is translated from Request, Filter, and Sort Advanced request items Modifying column deinitions Concatenation String manipulation Value replacement Date/time functions Nesting functions Datatypes Advanced iltering Custom SQL ilter option SubQuery option Custom SQL SubQuery
75 75 76 76 77 78 79 79 80 80 81 81 82 82 84
Custom SQL and custom join conditions Custom join conditions Combining queries The query log and exporting SQL Summary
84 85 86 90 90
Chapter 5: Results and Tables
91
Results section The Tables sections Creating a table section Duplicating a table Removing Table sections Removing Results sections Adding and modifying content Data layout
91 92 93 94 94 94 95 95
Auto-populating table columns Moving columns Hiding/showing columns
96 96 96 [ iii ]
Table of Contents Identifying computed items Removing columns
97 97
Filters Creating ilters Filters on multiple sections
99 99 100
Status Bar Filter performance
101 101
Sorting Sorting performance Creating totals Grand totals Break totals Impact when adding ilters Removing totals Grouping columns Computed items Computed item examples
101 102 102 103 103 104 104 104 105 106
Concatenation String manipulation Conditional functions Date/time functions Numeric functions
106 106 106 107 107
Date Groups Summary
107 109
Chapter 6: Pivots
111
Creating Pivot sections Pivot this Chart Pivots created using results or tables Removing Pivot sections Adding content Row and column labels Facts Data functions
112 112 112 113 113 114 114 114
Removing content Arranging label content Managing label and data headings Data labels Corner labels Sorting Manual sorting Analyzing content Drill
115 115 116 116 117 117 118 118 119 [ iv ]
Table of Contents
Drillup Focus and hide
120 120
Focus Hide
120 120
Totals and computed items Totals
122 122
Data functions for totals Removing totals Renaming items in row or column label Grouping
124 125 125 126
Computed items
126
True totals and surface values
127
Formatting and conditional formatting Conditional formatting Exporting and printing Summary
Chapter 7: Charts
128 128 129 130
131
Creating Chart sections Charts created using results or tables Chart this pivot Removing Chart sections Adding content Removing content Chart types Vertical and horizontal bar charts Vertical and horizontal stack bar charts Vertical cluster bar chart Pie charts Area and stacked area charts Line charts Ribbon charts Bar-Line charts Scatter / Bubble charts Legend Data functions Analyzing content Drill Drillup Focus Hide
132 132 132 132 133 134 134 134 138 140 140 142 143 144 146 147 148 149 149 150 150 150 150
Adding reference and trend lines
152
[v]
Table of Contents
Sorting Chart labels Chart formatting and properties Chart properties Inserting text labels Grouping and computed items Grouping Computed items Exporting charts Summary
152 152 153 153 153 154 154 154 155
Chapter 8: Reports
157
Creating Report sections An overview of the Report layout Headers and Footers Report setup Design guides Adding content Elements window
158 158 158 159 160 160 160
Query elements Graphics Fields Resources
161 161 161 161
Adding pivots and charts Adding a table Adding graphics, ields, and resources Removing content Resource Manager Building Report tables Table window Table dimensions and facts Dimension and fact properties Break totals Sorting results Removing elements Report groups Adding report group content Sorting groups Focusing and hiding report group content Creating and modifying expressions Table expressions Predeined ield expressions Report groups Custom ields
161 162 162 163 163 164 164 164 165 166 166 167 167 167 170 170 171 171 172 172 172
[ vi ]
Table of Contents Formatting expressions
173
Combining data from multiple queries Adding computed items and modifying items Exporting and printing Summary
Chapter 9: Dashboards
173 175 176 177
179
Creating Dashboard sections Understanding the Dashboard layout Editing the dashboard Dashboard objects Query objects Reports Graphics Controls Gauges Live Charts Resources Building a dashboard Adding sections Adding graphics and resources Adding gauges, live charts, and controls Removing content Adding content example Coniguring gauges Gauge properties and color ranges Coniguring live charts Live chart properties Working with controls Control types Script Editor Building an interactive dashboard Populating Drop Downs with a script Setting a ilter from a Drop Down control Exporting and printing Summary
Index
179 180 180 181 181 181 181 182 182 182 182 182 184 184 185 185 185 190 191 192 195 195 196 196 198 199 200 202 202
203
[ vii ]
Preface The Oracle Hyperion Interactive reporting product is a highly customizable and powerful business intelligence software product. The software is one of the many products in the Oracle Business Intelligence software suite, an industry-leading business intelligence solution. The product provides users with advanced business intelligence capabilities to eficiently and effectively query, analyze, and disseminate information throughout an enterprise. Users gain access to the product through the web-based Workspace, the central location for interacting and managing content across all of the Oracle Hyperion products. The tool has two user components, a zero-footprint client and a web client plug-in for web browsers. While the zero-footprint client has many beneits, users typically prefer the Web Client plug-in due to its easy-to-use, lexibility, and robust functionality. This book examines the power of the Interactive Reporting Web Client software, focusing on the key features of each section of the product. The book starts with a quick introduction to the product interface and the EPM Workspace, with explanation of navigating, importing, and provisioning. It then takes you through a chapter on each section of the product from building a query to building graphical dashboard displays. Reports, Tables, Pivots, and Charts are discussed at length, and an overview of more advanced features including Computed Items, Custom SQL, and Scripting are also included. The book also provides in-depth information on developer topics including building Data Models, creating Meta Topics, and integrating multiple queries into a table in a Report to educate the user on how to identify, build, and modify these advanced features of the product.
What this book covers Chapter 1, Welcome to Oracle Hyperion Interactive Reporting provides the business analyst with an overview of Interactive Reporting and EPM Workspace.
Preface
Chapter 2, The Query provides the tools necessary to effectively build and manage queries from a data model, including building request items, creating ilters, and sorting. Chapter 3, The Data Model provides the knowledge to create and edit a data model, including the ability to modify Joins, manage Meta Topics, combine data from multiple queries, and import external content. Chapter 4, Advanced Querying and Filtering provides the knowledge to implement advanced querying and iltering techniques to enhance reporting and to decrease manual efforts. Chapter 5, Results and Tables provides the knowledge to perform analysis in a Results and Table section on the data returned from a query. Chapter 6, Pivots provide a very effective method to summarize and analyze a dataset, providing the ability to quickly modify, compute, and rearrange data while easily repopulating the dataset with new data. Chapter 7, Charts provide the ability to graphically model data in a variety of different Chart formats including creating and coniguring Charts, analyzing Chart content, and methods for exporting and printing. Chapter 8, Reports provide an overview of a Report, including the knowledge to create and conigure Reports as well as analyze content and integrate data across datasets. Chapter 9, Dashboards provides the tools to create professional executive level dashboards, including an overview of dashboard objects and leveraging custom scripting to add dashboard interactivity.
What you need for this book This book was written using a standard deployment of Oracle EPM 11.1.1.3. The sections and techniques in this book are primarily version independent, where almost all of the functionality demonstrated will exist in previous versions of the product. References are made to some of the new features in Interactive Reporting 11, especially in the area of charting and dashboards as features have progressed throughout the new versions. The Sales and Cost model examples used throughout the book are from the Oracle 11g Database sample schemas.
[2]
Preface
Who this book is for The target audience of this book is the novice to advanced Oracle Hyperion Interactive reporting user. The book focuses on providing an understanding of the product, acclimating users to the software and providing an in-depth understanding on how to easily leverage the powerful functionality of the software.
Permissions Security can be set to documents in the Oracle Hyperion Workspace to prevent the user from accessing certain features of the product, including creating custom data models, editing queries, and saving and importing documents. This book is written with full access to all of the features of the product. References are made to permissions in certain sections. Contact your system administration resources for more information on your deployment if you cannot access certain features of the product in your environment.
Multidimensional queries Oracle Hyperion Interactive Reporting provides the capability to query against a multidimensional data source. Since multidimensional queries are less frequently deployed in Interactive Reporting, the focus of this book is on the relational querying and analysis capabilities of the product. More information on multidimensional queries can be found in the product documentation.
Additional resources There are many helpful online resources to learn more about Interactive Reporting, including three very common and useful references. The irst is the Oracle Business Intelligence 11g documentation, which contains the developer references for Interactive Reporting. The second is the "Tips and Tricks Cookbook", Mark Ostroff, a useful guide containing many Interactive Reporting tips, tricks, and advanced techniques. Both the Oracle documentation and the cookbook can be found on the Oracle website or through a simple web search. Finally Toolbox.com (http://it.toolbox.com), a commonly used website by developers, contains Hyperion and Brio knowledge groups providing the ability to search for answers and post questions to a large user community.
[3]
Preface
Conventions In this book, you will ind a number of styles of text that distinguish between different kinds of information. Here are some examples of these styles, and an explanation of their meaning. Code words in text are shown as follows: "The currBreak identiier is used by Interactive Reporting to identify the level of detail to split out the data in the report". A block of code is set as follows: if(ActiveDocument.Sections["Dashboard"].Shapes["ddDropDown"].Selected Index == 1) { } else { //Grab the Selected Item from the Drop Down and Populate the Value to the Selected Items in the Filter. ActiveDocument.Sections["R_Sales"].Limits["Prod Category"].SelectedValues.Add(ActiveDocument.Sections["Dashboard"] .Shapes["ddDropDown"].Item(ActiveDocument.Sections["Dashboard"] .Shapes["ddDropDown"].SelectedIndex)) }
New terms and important words are shown in bold. Words that you see on the screen, in menus or dialog boxes for example, appear in the text like this: "After entering the script, click on OK on the script window". Warnings or important notes appear in a box like this.
Tips and tricks appear like this.
Reader feedback Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or may have disliked. Reader feedback is important for us to develop titles that you really get the most out of. To send us general feedback, simply send an e-mail to [email protected], and mention the book title via the subject of your message. [4]
Preface
If there is a book that you need and would like to see us publish, please send us a note in the SUGGEST A TITLE form on www.packtpub.com or e-mail [email protected]. If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide on www.packtpub.com/authors.
Customer support Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.
Errata Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you ind a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you would report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you ind any errata, please report them by visiting http://www. packtpub.com/support, selecting your book, clicking on the errata submission form link, and entering the details of your errata. Once your errata are veriied, your submission will be accepted and the errata will be uploaded on our website, or added to any list of existing errata, under the Errata section of that title. Any existing errata can be viewed by selecting your title from http://www.packtpub.com/support.
Piracy Piracy of copyright material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works, in any form, on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy. Please contact us at [email protected] with a link to the suspected pirated material. We appreciate your help in protecting our authors, and our ability to bring you valuable content.
Questions You can contact us at [email protected] if you are having a problem with any aspect of the book, and we will do our best to address it. [5]
Oracle Hyperion Interactive Reporting Welcome to Oracle Hyperion Interactive Reporting! Interactive Reporting is an extremely robust and powerful business intelligence tool providing ad-hoc querying, data analysis, dashboards, and other reporting capabilities. Business analysts access the software through the EPM Workspace, a central location for viewing and managing content across all of the Hyperion products. The product is extremely lexible and provides analysts with the ability to quickly analyze data and produce deliverables. The software provides a consistent platform for managing content, where documents can be customized, saved, and shared across an organization. The focus of this chapter is to provide an overview of the Interactive Reporting Web Client and EPM Workspace, providing the business analyst with the skills necessary to work with the tool on a daily basis. The content in this chapter covers: • •
Navigating the EPM Workspace
•
An Overview of the Web Client interface
•
Installing the Web Client
•
Methods for opening and saving documents
•
Methods for importing and provisioning iles Steps to edit ile properties
Oracle Hyperion Interactive Reporting
The Interactive Reporting document: The BQY When working with Interactive Reporting, it is hard to escape the term BQY. BQY or BrioQuery, is the extension given to all Interactive Reporting document iles. Developers create BQY iles using the Workspace, Interactive Reporting Web Client, or Interactive Reporting Studio—a developer tool used to create and manage BQY documents outside of the EPM Workspace.
The EPM Workspace The EPM Workspace is similar to a portal, where all Oracle Hyperion applications, reports, and other iles can be accessed and integrated using a shared security model. The Workspace is accessible through the web browser and contains a ilesystem and other gadgets including personal pages and content subscription. Interactive Reporting is one of the many products that integrate with the Workspace, providing users a central location to save, share, and publish content.
Navigating the EPM Workspace To navigate the Workspace, a user account must be created and provisioned with the necessary privileges to the Workspace and the Interactive Reporting components. After the user account is created, users can access the Workspace using a web browser. Each environment may be conigured differently and have different login methods and start pages conigured. However, this book provides examples based on the default product coniguration.
The following screenshot shows the default login page for the EPM Workspace in version 11. Once the user enters the assigned username and password, the default home page appears. Other conigurations may be conigured to use external authentication methods, where the user will bypass the initial login screen and start at the default start page for their coniguration.
[8]
Chapter 1
The default home page shown in the following screenshot is new to the Workspace in version 11. The new home page feature allows users to add Quick Links, browse recently opened documents, and view custom created Workspace pages.
[9]
Oracle Hyperion Interactive Reporting
If the desired content is not listed on the main home page, the Explorer can be accessed by clicking on the Explore image on the toolbar at the top of the page, allowing users to browse for content in the Workspace ilesystem similar to Windows Explorer. The Explore window, shown in the following screenshot, opens to a page with two frames showing a folder structure on the left for navigating the ile structure and the contents of the current folder on the right for managing and executing items. The main parent folder in the ile system is called the Root folder and other iles and folders can be added under the Root folder as desired. If there is a need to return to the previous page, the user can click on the HomePage tab at the bottom-left of the page. As additional items are opened in the Workspace, additional tabs are created at the bottom of the screen. The user can navigate through the different items opened by using the tabs across the bottom of the Workspace window. If desired, these tabs can be closed by right-clicking on the tab and selecting Close.
After navigating to the desired folder, the user can open the documents of interest. Files from different applications are designated with two unique identiiers in the Explore window. The irst identiier is the image that is shown to the left of the name, and the second identiier is the object Type. The documents shown in the previous screenshot are Interactive Reporting documents and can be opened using the HTML viewer or the Interactive Reporting Web Client. Selecting the HTML option will render the document in a new tab, while opening the document in the Interactive Reporting Web Client will open the document in a new browser window. [ 10 ]
Chapter 1
Installing the Interactive Reporting Web Client The Interactive Reporting Web Client software must be installed to open documents in the Web Client. This installation is a plug-in to the browser, where the browser will activate the Web Client software when an Interactive Reporting ile is initiated. The installation will automatically execute upon opening the Interactive Reporting document in a browser without the Web Client installed, or the installation can be manually executed by accessing the Tools | Install | Interactive Reporting Web Client item as shown in the following screenshot:
Once the installation is initiated, a window appears with the ability to customize the installation by checking/unchecking options. The default installation will install all of the components of the tool and is recommended:
[ 11 ]
Oracle Hyperion Interactive Reporting
The installation will commence after clicking on the Next button on the coniguration menu and will continue through the completion of the installation, signiied by the following window:
Opening documents in the Workspace Interactive Reporting documents are opened by double-clicking on the document in the Workspace or by highlighting and right-clicking the document, highlighting Open As, and selecting either HTML or Interactive Reporting Web Client from the menu as shown in the following screenshot.
When the document is double-clicked, the default coniguration method for opening the document is invoked by Interactive Reporting. Initially the software is conigured to use the HTML viewer as the default, but the default preference can easily be changed by modifying the Default Open Format of the document in the Interactive Reporting preferences of the Workspace. The main Preferences window is opened by accessing the File menu and selecting the Preferences menu item, as shown in the following screenshot. Once the Preferences window is open, the Default Open Format is found under the Interactive Reporting tab on the left menu of the window. To change the default format from HTML to the Interactive Reporting Web Client, click on the drop-down arrow, select the Interactive Reporting Web Client item, and then click on the OK button on the Preferences window. In addition to the ile open format, other preferences can be modiied in this window to address changing formats for date, time, and currency.
[ 12 ]
Chapter 1
Opening documents from the local machine Interactive Reporting documents can be saved and opened from the local machine by opening the document using the web browser with Web Client installed. To open the document from the local machine, highlight and right-click on the Interactive Reporting ile and select Open With from the menu that appears. If the web browser of choice is not listed, select Choose Program from the list. Browse the window, select the web browser with the plug-in installed, and check the checkbox at the bottom to Always use the selected program to open this kind of ile in order to always open the Interactive Reporting document in the selected web browser. Then select OK in the window to open the Interactive Reporting document with the web browser. The web browser will open and the Web Client will load the document into the viewing window. If ofline mode is not turned on, the document will open a window to authenticate with the Workspace. If no connection can be established with the Workspace, only the data sections will be visible when the document is opened. If the connection can be established and the ile saved to the desktop still exists in the Workspace, then the document will load with proper permissions to the ile and the document can be processed as if it was opened from the Workspace. If the ile is not located in the Workspace, then the ile can be imported by the user if the user has import permissions. Instructions for importing are found in the importing section of this chapter. [ 13 ]
Oracle Hyperion Interactive Reporting
The Web Client interface Understanding the Web Client interface is crucial to being proicient in the product. The different sections of the software contain a variety of different options, but the location of where to ind and utilize these options is the same across the tool. Knowledge of the interface and how to leverage the features of each section is key to unlock the full potential of the product. The sections of an Interactive Reporting document are the different objects in the software used to aid in querying, analyzing, or displaying information. There are seven types of unique sections. The speciics of each section will be addressed in the following chapters: •
• • • • • •
The Query section is the main section used to setup and execute a query from a relational or multi-dimensional database. Each Query section is accompanied by a Results section where the data returned from the Query is displayed and can be manipulated. The Table section is similar to the Results section and is used to manipulate and split a dataset into different subsets for analysis. The Pivot section is speciic to a Results or Table section, and is used to graphically display data in pivot table format—similar to Microsoft Excel Pivots. The Chart section is also speciic to a Results or Table section and is used to display data in a chart. The Report section provides the ability to present pivots, charts, and tables of data in a well formatted document. Dashboards are used to create custom interfaces or interactive displays of key metrics.
The following screenshot displays the Interactive Reporting Web Client window open to the Query section. The arrows shown in the screenshot highlight each of the different features and toolbars of the product. These different features and toolbars can be toggled on and off using the View menu:
[ 14 ]
Chapter 1
The Section Catalogue The Section Catalogue, displayed on the left of the previous screenshot, contains two windows for navigating and editing sections. The Sections window displays the different sections in the document, and the Elements window is used to add content to a section. Both windows are used commonly when building documents and performing analysis.
Menus The Interactive Reporting Web Client Menus are similar to a typical menu structure seen in most Windows-based applications. Interactive Reporting contains a standard set of menus and each section also contains menus speciic to a section. The details of the section-speciic menu items will be discussed in each respective chapter. The following menu items are consistent between all product sections: [ 15 ]
Oracle Hyperion Interactive Reporting
•
• • •
• • •
The File menu provides the features for managing the document, including the ability to save documents both to the local drive and to the Workspace, the ability to import external data, and the ability to export and print content. The Edit menu contains the general options for managing sections. These features include the standard copy and paste options, but also include the ability to delete, rename, and duplicate sections. The View menu contains the features for managing the different windows and views of the document, including showing/hiding windows and displaying query-speciic information. The Insert menu is used to add a new section into the document. The Format menu is used to format the display of sections, including font, color, size, type, and other common formatting options. The Tools menu provides the ability to execute queries and manage default and program options.
The Help menu contains the help contents, links, and information about the product version.
These menu items are shown in the following screenshot:
Toolbars The Interactive Reporting Web Client contains three standard toolbars used to manage views, content, and formatting. The toolbars are turned on and off through the View menu. To show or hide a toolbar from the viewing area, go to View Menu | Toolbars, and then click on the toolbar name to show or hide it. A checkbox next to the toolbar signiies the toolbar is shown in the viewing area. The following is a description of each of the three toolbars: •
•
The Standard toolbar contains shortcuts to the common standard features of the tool including saving, printing, inserting, and query processing.
The Formatting toolbar contains controls to manage fonts, backgrounds, and number formats.
[ 16 ]
Chapter 1
•
The Section toolbar only applies to the Dashboard, Report, and Chart sections, and is used to modify and control object layouts and chart types.
Section Title Bar The Section Title Bar has two different purposes. The bar contains a navigation dropdown on the left of the bar, and it contains section-speciic controls on the right-side of the bar which is used to toggle options on and off. These options are speciic to each section and are used to build queries, add content to a section, or to sort content. When these options are toggled on, the options will be displayed at the top or bottom of the main content window. The individual chapters for each section provide a breakdown of the different options included in the Section Title Bar.
Status Bar The Status Bar is shown at the bottom of the Web Client interface and contains information on a speciic section. The information provided in the Status Bar includes the number of rows returned from a query, the number of rows shown in a results set, the number of rows and columns in a pivot table, the number of report pages, and the zoom settings on the dashboard.
Saving documents Documents can be saved to both the Workspace and to the local machine with data and formatted Dashboards, Pivots, Charts, and Reports, allowing for a snapshot of data and section templates to be saved and reused as desired. A variety of save options exist including settings to reduce ile size, settings for password protection, and settings to toggle the ofline mode of the document.
[ 17 ]
Oracle Hyperion Interactive Reporting
Saving documents to the Workspace Documents are easily saved to the Workspace from the Interactive Reporting Web Client. There are two options for saving to the Workspace and both options are located in the File menu. Selecting the irst option, Save to Repository, saves the changes in the open document over the document in the Workspace. Selecting the second option, Save to Repository As, prompts a Workspace Explore window, as shown in the following screenshot, allowing navigation to the preferred save location. Clicking on Save in the window will save the document to the location or will prompt an alert box for veriication to overwrite an existing ile. If the recently saved document does not appear when returning to the main Explore window, refresh the list of available documents by right-clicking on the main window and selecting the Refresh menu option.
Saving documents to the local machine Interactive Reporting Web Client documents can be saved to the local machine, similar to saving documents to the Workspace. To save a document to the local machine, click on the Save button on the standard toolbar or access the File menu and select Save As. The following screenshot shows the standard save window that appears when saving a document to the local machine. Notice that the ile type is speciied as Interactive Reporting Web Client (*.bqy), and the document when saved to the local machines will contain the BQY extension:
[ 18 ]
Chapter 1
Save options The File menu contains a list of save options for managing ile size and access. The irst option in the Save Options menu is named Save Query Results With Document, which is used to reduce the ile size by excluding the data results or the computed items in the Results or Table section of the document. Saving large results may take up signiicant disk space, so excluding the results of a Query may be desired to reduce the ile size. The following screenshot shows the window that appears after selecting the Save Query Results With Document menu selection. As shown in the screenshot, the Query Results and Computed Columns can be deselected. In the example, the T_Sales computed item has been unchecked, removing the storage of the computed items in the Table section named T_Sales. By unchecking the X next to a section in the Query Results window, the data stored in the Results section of the named Query will not be stored when the document is saved.
[ 19 ]
Oracle Hyperion Interactive Reporting
Password protecting the document Documents can be password protected from unauthorized access. Since documents can be saved locally, adding a password to the document will provide security to the data contained in the ile. The Password Protect Document method is accessed by clicking on the File menu, highlighting Save Options, and selecting the Password Protect Document menu option. The following screenshot shows the password protection window, where both a password and veriication of password must be entered to create a password on the document. Upon opening the document, a similar window will appear prompting for the password to the document.
Password protecting the design mode Custom code and dashboard objects may also be password protected, and the custom code of the document may be encrypted to prevent access to the programming contained in the document. Users writing custom code may be interested in this feature to protect certain code statements from being accessible to the general user community. Access the design mode password protection window by clicking the File menu, highlighting Save Options, and selecting the Password Protect Design Mode menu item. The following screenshot shows the design mode password protection window, where a password is conigured and a checkbox is set allowing for the encryption of the code in the document. Code encrypted in documents will not function in releases of Interactive Reporting prior to 8.1, as stated in the following screenshot.
Once password protection for the design mode is conigured and a user attempts to open the design mode of the document, a window will appear prompting for the password to unlock the design mode of the document similar to accessing a password-protected document. [ 20 ]
Chapter 1
Ofline mode
Locally saved BQY documents can also be conigured to run in ofline mode where the document does not attempt to authenticate with the Workspace when opened. The ofline mode setting can be accessed by clicking on the File menu, highlighting Save Options, and then selecting the Work Ofline in Web Client menu item.
Importing BQY documents into the EPM Workspace Locally saved iles can be imported into the Workspace for use by the user or other individuals. The irst step in importing a document into the Workspace is to logon to the Workspace and browse the Explore window to the area of interest. Once a folder has been selected, the Import can be initiated by selecting the File menu, highlighting Import, and selecting the File menu option. The import is also commonly initiated by right-clicking inside the folder of the Workspace, highlighting Import, and selecting the File option as shown in the following screenshot:
Once the ile import option has been selected, the Import window appears inside the Workspace, as shown in the following screenshot. The irst step in importing a document into the Workspace is to select the ile to import. The Multiple Files button cannot be used for Interactive Reporting documents. Interactive Reporting documents must be imported one ile at a time.
[ 21 ]
Oracle Hyperion Interactive Reporting
Use the Browse button to select the Interactive Reporting (BQY) ile of interest. Once the ile has been selected, the path to the document will be shown in the File box and the Name ield will be populated with the ilename. The ilename may be edited at this time or can be changed at any time by editing the ile properties:
Once the ile has been selected and the name has been set, click on the Next button at the bottom of the screen to continue. The next screenshot shows the next step in the ile import process. Notice the left menu of the Import window. The Import module has identiied the ile type as an Interactive Reporting document and shows the four steps necessary to complete the import of this ile type.
The second step in the import process is to set the connection ile for the data model. The connection iles are called OCE iles, or Interactive Reporting Database Connection iles (previously called Open Catalogue Extension iles). These OCE iles contain the information needed for the document to make a connection to the database to run a query. Each Query/DataModel in the document is displayed to allow for the selection of a connection ile in the import. A connection ile does not need to be set to any of the Query sections to import a ile to the Workspace. The connection iles are only needed to allow the document to process and refresh data from a data source. It is acceptable to leave the connections blank if the desired intent is not to process the document. [ 22 ]
Chapter 1
The irst step in setting the connection ile is to select the connection ile of interest from the Connection drop-down box. The connection iles shown in the Connection drop-down box are conigured by system administrators and permissions are set to users/groups. Environments may be setup to not show any connection iles in this drop-down box, thus preventing the user from setting a connection to the document.
Typically, connection iles are well organized and set with well deined names to provide the user with adequate information to make a selection. Once the preferred connection iles are set to the document, a few different options can be set to conigure the username and password for the document. Each authentication method can be set individually for each query or the same option can be applied for all queries using the Apply Option to All Queries drop-down box at the top of the screen.
[ 23 ]
Oracle Hyperion Interactive Reporting
Three options exist for entering the password for the connection ile. In most cases, the Use Default User Name & Password option from the Apply Option to All Queries drop-down is used to set the username and password. This option uses the username and password stored in the connection ile when it was imported into the Workspace (if conigured). The other options require the user to know the database username and password. The Prompt option prompts the user for the username and password when the document attempts to connect or reconnect to a database during use. The inal option is the blank option in the Options drop-down menu or is named Specify Now in the Apply Option to All Queries menu. This option requires the user to input the username and password into the User Name and Password boxes on the screen. Once the connection iles have been conigured, click on the Next button at the bottom of the screen to proceed to the Advanced options coniguration:
The Advanced page shown in the previous screenshot contains the ability to change the ile type, make the ile hidden, set an auto delete date, leverage exceptions, and manually or automatically generate keywords. Most users skip the advanced settings, but users may be interested in setting an auto-delete date or hiding the ile. Users can view hidden iles by selecting the Show Hidden item from the View menu in the Explore window. After coniguring or electing not to conigure any of the advanced settings, click on the Next button at the bottom of the screen to move to the inal step. The following screenshot shows the Permissions coniguration, the inal step in importing an Interactive Reporting document: [ 24 ]
Chapter 1
Understanding the Permissions interface and settings is the key to correctly coniguring the permissions for the document. The window on the left is used to search for users, groups, or roles to be set to the document. The window on the right shows the users, groups, and roles that have been selected, and the buttons in the middle are used to add or remove users, groups, and roles from the assignment window. Once items have been added to the assignment window, the user, group, or role is given access to the ile and an adaptive state. Access to File controls the ability the user/group/role has to edit the document and includes the following properties: • • • • •
The Inherit selection is used to not specify access for that particular user / group / role. This selection should be used when the user/group/role is contained in another user or group that is also selected to the document. Selecting No Access prevents the selected user/group/role from accessing the document. The View selection provides the user/group/role with the ability to view the document but not modify or save changes. The Modify selection provides the user/group/role with the ability to modify the ile and document properties, but not to conigure permissions or delete the ile. The Full Control selection provides full access to the document properties including the ability to provision the document to other users.
[ 25 ]
Oracle Hyperion Interactive Reporting
The Adaptive State controls the level of access within the Interactive Reporting document and includes the following settings: •
• • • • • •
The Inherit property behaves similarly to the ile access Inherit property, where the selection is used to not provide a speciic type of restriction to the document. This selection should be used when the user/group/role is contained in another user or group that is also selected to the document. The View Only property provides the user/group/role with the ability to view but not modify, process, or conduct analysis in the document. The View and Process property is similar to the View Only property, but the query sections in the document can be processed to refresh the document data. The Analyze property allows for the modiication of the reporting sections in the document but does not contain the ability to process the document. The Analyze and Process property is similar to the Analyze property but allows the document to be processed and refreshed with data. The Query and Analyze property allows the user to have full access to the document sections including the ability to modify and process queries. This property does not allow the ability to edit any DataModel sections. The DataModel and Analyze selection provides full access to every section of the document.
To perform a simple permission coniguration, select the User or Group tab from the Permissions interface. Search for the item of interest by using the textbox and Update List button. Once the desired item is shown in the window, highlight the item and click the button in the middle with the arrow to the right in order to move the item into the assignment window. Finally, use the drop-down menus to set the Access to the File and the Adaptive State of the document. Coniguring permissions can become complex based on multiple users, groups, and role assignments coupled with the ability to set independent ile access and adaptive state for each item.
The last step in the import process is to click on the Finish button at the bottom of the screen. Once completed, the Import window will disappear and the Explore window will become active showing the newly imported document.
[ 26 ]
Chapter 1
Editing Interactive Reporting ile properties After iles are posted to the Workspace, iles can be edited to change ile permissions, to change database connection iles, to change ile attributes, and to post new versions of the document. To change the ile properties in the Workspace, right-click on the ile and select Properties. The Properties window appears and displays the General Properties as shown in the following screenshot:
The navigation to other options is displayed on the left side of the window, where the different buttons can be clicked to bring up the different ile properties. The Permissions, Advanced, and Interactive Reporting properties (database connection) screens mimic the screens shown during the importing of a ile, and the settings saved from the most recent edit of the ile properties will be populated in each section. The General Properties window is used to change the Name, Description, and Owner of the ile. Also included in this section is the SmartCut, the URL to the document that can be pasted into a web browser or sent in an e-mail. The SmartCut changes with modiications to the ile path or the ilename, and the default URL opens the ile in the HTML view of the document. To open a SmartCut in the Interactive Reporting Web Client, add a ?bqtype=plugin to the end of the URL.
[ 27 ]
Oracle Hyperion Interactive Reporting
The Versions tab can also be used to manage ile versions. As versions are added, additional rows are added to the Versions window as shown in the following screenshot. To post an updated ile to one of the versions, click on the Replace button next to the version of interest. To add a new version to the ile, click on the Add New Version button at the bottom-left of the window. Click on the Modify link to update the connection or general version properties, and click on the Delete button to remove a version:
Summary The focus of this chapter was to provide the business analyst with an overview of Interactive Reporting and the EPM Workspace. This chapter began with an introduction to the EPM Workspace providing login, navigation, and details for accessing documents. The chapter continued with an in-depth explanation of the different features of Interactive Reporting Web Client, including the layout, sections, menus, toolbars, and other key tool attributes necessary to understanding and successfully leveraging the full capabilities of the software. The chapter continued with an overview of saving documents, save options, and opening documents from both the Workspace and the local machine. The chapter concluded with importing and editing documents in the Workspace, including coniguring database connections as well as provisioning users and groups to the document.
[ 28 ]
The Query The Query section is a gateway to Interactive Reporting for building a query and retrieving data from a database. The Query provides the business analyst with an ad-hoc interface to model and analyze data, allowing the analyst to create, modify, and run scenarios on key business metrics. The Query section supplies the data for all of the other presentation sections of the document, and the Query section can easily be modiied and reprocessed as desired. The goal of this chapter is to provide the business analyst with the tools necessary to effectively build and manage queries from a data model. This chapter covers: • •
An overview of the Query section layout
•
Creating request items
•
Sorting
•
Query options
• • •
Building a query Creating ilters Query processing Identifying metadata (table and column remarks)
The following two chapters address features of the query including building data models and advanced querying and iltering techniques. The examples in this section are based on the understanding that DataModel and Analyze permissions are set to the document in the Workspace to provide full capabilities of the Web Client.
The Query
The Query section layout The Query section layout is conigured to easily drag-and-drop the content from a data model into the Request, Filter, and Sort lines to build the desired query. This section contains a main window that is used to conigure and display the data model. The Sections window, Section Title Bar, and Status Bar facilitate working with the query and provide useful information throughout the process.
Sections window The Sections window is located on top of the Section Catalogue and is displayed in the following screenshot. Each Query section in the document is always accompanied by a Results section. The Query section is used to model a query, and the Results section contains the data returned after the query is processed. In the following screenshot, the Query section is named Q_Sales and the Results section is named R_Sales:
Each section in the document must contain a unique name. To edit the name of a section, right-click on the section in the Section Catalogue, and click on the Rename Section option.
Section Title Bar The Section Title Bar contains three key items used to conigure the Request, Filter, and Sort logic for the query. Clicking on each of the options displays the respective lines as shown in the main window of the following screenshot:
[ 30 ]
Chapter 2
The Request, Filter, and Sort lines are used to query, limit, and sort a deined dataset from the data model. The lines can be rearranged by dragging a line above, below, or beside another line. The lines are expanded by dragging-and-dropping the line away from the top of the section window to unlock the item from the window. Once the item is unlocked, it can be resized as necessary. Double-clicking the header of the window will snap the window back into place. As items are added to each of the lines, the number of items in each line is denoted next to the Request, Filter, and Sort lines in the Section title bar.
Status Bar The Status Bar is displayed at the bottom of the screen and displays information on the number of rows returned from a query and the number of objects displayed in the data model. The following screenshot is an example of the Status Bar:
Working with pre-built data models In mature environments, business analysts partner with developers or colleagues with a strong database background to create pre-built data models to query. Working with a standard pre-built query template ensures that the model has been correctly conigured and will produce accurate data in a timely manner. The following screenshot is a predeined query against the Sales model:
[ 31 ]
The Query
Notice in the previous example that there are seven objects joined together in the main window. These objects are typically tables from a database or preconigured topics of information (Interactive Reporting objects used to combine data together to make querying easier for the analyst). Each of these table's objects contain multiple elements, which represent columns of data. From this coniguration, the analyst can use the elements in the tables on the screen to build a query to retrieve data from the database.
Building a query A query is built by adding and coniguring items in the Request, Filter, and Sort areas of the section. Interactive Reporting provides a signiicant amount of lexibility for building queries, including the ability to add custom logic into the query. Once the query is conigured, the query can be processed and modiied as desired.
Request items The columns of data returned from a query are conigured by adding items to the Request line. Items from the model are added to the Request line by the following two methods: Right-click method
Drag-and-drop method
Highlight the column(s) in the table of interest.
Highlight the column(s) in the table of interest.
Right-click and select Add Selected Items.
Drag-and-drop the columns into the Request line.
The Ctrl and Shift keys can be used to highlight multiple columns, and right-clicking on the entire table object and selecting Add Selected Items will add all of the items in the table into the Request line.
The following example demonstrates building a query of the number of products sold by Fiscal Year from the Sales data model. The irst step is to drag-and-drop the Prod Name ield in the Products table and the Fiscal Year column from the Times table to the Request line.
[ 32 ]
Chapter 2
[ 33 ]
The Query
Then the Quantity Sold column is added to the Request line to add the numeric "fact" data to the query. Since the intent of the query is to summarize the number sold, a data function must be added to the numeric "fact" ield. To summarize the data, the sum function is added to the Quantity Sold column by highlighting the Quantity Sold box in the Request line, right-clicking it, and selecting Data Functions | Sum as shown in the following screenshot:
The Request line now contains three items that will be returned when the query is processed. Since there are no ilters applied to the query, the query will return results from all of the data contained in the Sales table. The next section will address adding ilters to the query. Not adding the data function to this query returns each individual row from the model, instead of producing a nicely summarized view of the data. When working with queries, leverage data functions to quickly return summarized results of interest. [ 34 ]
Chapter 2
Removing request items Request line items are easily removed by highlighting the item(s) in the Request line and clicking on the Delete key. The Ctrl and Shift keys can be used to select multiple items at a time. All of the items in the Request line can be easily removed by right-clicking on the word Request and selecting Remove.
Filters Filters provide the ability to return a subset of data in the model by a ield or combination of ields from the data model. Interactive Reporting provides a very robust iltering capability, where complex ilters can be added to queries through an easy-to-use interface. A ilter is easily added to the query by adding the item to the Filter line. Items are added to the ilter line by using one of the following two methods: Right-click method
Drag-and-drop method
Highlight the column in the table of interest.
Highlight the column in the table of interest.
Right-click and select Filter.
Drag-and-drop the column into the Filter line.
Since the ilter must be conigured after it is added, only one column can be added to the Filter line at a time. Once the column has been added to the Filter line, the Filter interface appears to conigure the ilter values for the column.
Filter interface The Filter interface provides signiicant lexibility for building complex ilter conditions. Understanding the options provided in the Filter interface is necessary to leverage the full iltering capabilities of the software. [ 35 ]
The Query
The previous screenshot shows a blank ilter box opened to the Custom Values option. Three types of iltering options can be used to customize the ilter box: Show Values, Custom Values, and Custom SQL. The different ilter options drive the appearance of the Filter interface and methods used to ilter data. A drop-down and two checkboxes are shown on the interface for modifying the operator of the ilter. The operator drop-down box contains the following options: •
• • • • • •
•
• •
•
The = Equal option ilters the data in the query to the speciic values selected. Multiple items can be selected at a time using this operator. The Not Equal option sets the ilter to exclude the values selected. Multiple items can be selected using this operator. The < Less Than option ilters the data set to items less than the item selected. Only one item can be selected using this operator. The Greater Than option ilters the data set to items greater than the item selected. Only one item can be selected at a time using this operator. The >= Greater Than or Equal option ilters the data set to items greater than or equal to the item selected. Only one item can be selected using this operator. The Begins With option ilters the data set to all values in a ield beginning with the speciic set of characters selected; for example, using the ilter Denm in the country ilter, to ilter the data to all countries that start with the characters Denm. Multiple items can be selected using this operator. The Contains option ilters the data set to all values in a ield containing a speciic set of characters; for example, using the ilter television in the promotion name ield to ilter the data to all promotions that contain the word television. Multiple items can be selected using this operator. The Ends With option ilters the data set to all values in a ield ending with a speciic set of characters. Multiple items can be selected using this operator. The Like option leverages the Like command in SQL to ilter data; for example, using the ilter Denm%rk will look for all records that begin with Denm and end with the rk characters. This is similar to using a Begins With and Ends With ilter together. The wildcard (%) tells the database to ind all records with the starting and ending condition. Multiple wildcards can be used in the same ilter. Multiple items can be selected using this operator. The Between option ilters data between two items and is most commonly used for ranges of dates and numbers. For Example, use the Between operator to ilter the query between 1/1/2009 and 12/31/2010. Two items must be selected when using this operator. [ 36 ]
•
Chapter 2
The Is Null option ilters data to all igures where there are null values for a particular ield. No items should be selected when using this operator.
The two checkboxes on the interface provide the following features: •
•
The Not checkbox is used to invert the operator selected in the operator drop-down box. The Include Nulls checkbox is used to include all null results in addition to the ilter criteria selected. Options in the drop-down and checkboxes intentionally overlap. As a best practice, use the drop-down options irst and then complement them with the checkboxes where applicable.
A few additional features that exist on the Filter interface are as follows: •
• •
The Ignore button turns the ilter to inactive and can be reinitiated by opening and setting the ilter. A good feature of the Ignore option is that all of the Filter customizations are retained when the ilter is ignored. Deleting the ilter would result in losing all preconigured custom ilter values and conigurations. Ignored ilters appear with light grey text in the Filter line to denote that the ilter is ignored during query processing. The Filter Name box can also be edited allowing for multiple ilters of the same ield to be added to the query. Each object in the Filter line must contain a unique name. The Advanced button opens a dialogue for coniguring the advanced features of the Filter window, including options for loading values and creating subqueries. The development team can conigure to show (or hide) a number of the features shown in the ilter interface to prevent the user from accessing options such as specifying custom ilters, allowing ignoring, removing the ability to set the ilter operator, and so on. If the ilter interface does not contain speciic iltering options, contact the individuals responsible for creating the document.
[ 37 ]
The Query
Show Values The irst and easiest method of iltering is to use the Show Values option of the Filter window. By clicking on the Show Values button, a query is sent from the software to the database to display a distinct list of values sorted in ascending order. In the following screenshot, the Show Values button has been clicked for the Country Name ilter displaying the distinct list of countries in the Filter window.
When the values appear in the window, the ilter can be set by highlighting the values in the window. After the ilter selections are made, clicking on the OK button adds the ilter to the Filter line. In the previous screenshot, the ilter values Denmark and Germany are selected. After the ilter has been selected, the tables in the data model display the information to denote that a particular ield from the table is used in the ilter of the query. In the following screenshot, the = sign is shown to the left of the Country Name ield denoting that the country name ield contains a ilter with the = operator. In addition to the display of the ilter operator in the table, the ilter selection can be sampled without needing to reopen the ilter. Highlighting the mouse cursor over the ilter item will display a text pop-up showing the items set in the ilter as shown in the following screenshot:
[ 38 ]
Chapter 2
Custom Values Three different methods exist for adding Custom Values to the Filter. Custom Values can be manually entered, transferred from the Show Values screen, or imported from a ile.
[ 39 ]
The Query
Manual entry The irst method of adding Custom Values is to simply add the values to the interface by typing in the value textbox shown below the operator drop-down menu. An example of this is shown in the following screenshot by using the Cust Year Of Birth ield from the Customer table. When adding the Cust Year Of Birth ield to the Filter line, the window shown in the following screenshot appears. Simply typing the values 1970, 1979 into the textbox, as shown in the following screenshot, and clicking on the green checkbox will add and select (highlight) the year for addition to the ilter:
The Custom Values window behaves similarly to the Show Values window, where only the items highlighted in the window are activated in the ilter. Therefore, multiple items can be added and retained in the Custom value box for future use and reuse. Once the value has been added to the Custom value selection box, the item is retained till it is removed. The removal can be completed in the interface by highlighting the item and clicking on the Remove button on the left of the interface. Continuing with the Custom Values example, the drop-down operator box containing the = Equal sign is changed to the Between property to select the operator needed to ilter the data to a range of values as shown in the following screenshot:
[ 40 ]
Chapter 2
Clicking on the OK button adds the ilter into the Filter line, where the two ilters (Country Name and Cust Year Of Birth) now appear with the AND sign between them.
Transfer values The Transfer method allows for the transporting of values from the list of values in the Show Values selection list into the Custom Values selection list. The Transfer method is used commonly to work with a subset of values from Show Values list without needing to refresh the values from the database each time. The Transfer button appears in the Show Values window as shown in the following screenshot:
After selecting and clicking on the Transfer button, the values (Denmark and Germany) are copied to the Custom Values selection window and the Custom Values selection window becomes active. Once the values are added to the Custom Values selection list, the values can be selected or removed as desired.
[ 41 ]
The Query
Loading ilters from a ile (importing)
The Filter window displays two additional Advanced ilters not shown in the basic Filter window. Clicking on the Advanced button on the bottom-right of the Filter window toggles the display of additional options for modifying the ilter as shown in the following screenshot:
The Loaded Values Settings toggle the method used to populate values displayed in the selection box of Show Values option. The Load From Database option is the default setting, where Interactive Reporting queries the database to obtain a distinct list of values for selection. The Load From File option is used to populate the list of ilter options with a user-deined list of values obtained from a text ile. The Load From File option is useful for users with a predeined list of ilter values. The construction of the text ile requires each piece of information to be on an individual row of the document and the ile must contain the .txt extension.
[ 42 ]
Chapter 2
Microsoft Excel can also be used to create the ile. One easy to use approach is to copy and paste rows from a sheet or pivot table into a Notepad ile. The output will be an item per line, which is perfect for loading into the ilter.
The ile is loaded into Interactive Reporting by using the Change File button on the Filter window. After the ile is loaded, clicking on the Show Values button in the Filter window populates the ilter selection box with the list of values from the ile in alphabetical order and with duplicates removed. The distinct list of values is now ready to be selected by the user, similar to selecting a ilter value populated from a database. All the functionality of the ilter can still be used, and the ilter can now be toggled between the ile and the database by changing the radio button at any time in the Loaded Values Setting section. The text ile can be updated on-demand with new values by clicking on the Change File button and reselecting the ile.
Modifying the AND and OR operators Many queries contain ilter logic requiring the iltering of data using different iltering conditions. The Interactive Reporting Query section easily accommodates the use of both the AND or OR SQL operators. In the previous example, another geographic ilter will be added along with the use of parenthesis ( ) to demonstrate the use of conditional logic for ilters.
[ 43 ]
The Query
Continuing with the example query, the Customer Region ield is added by double-clicking on the Country Region ield in the Countries table, selecting the Americas option from the Show Values selection list, and clicking on OK. The Country Region ilter now appears on the Filter line along with Country Name and Cust Year Of Birth separated by the AND SQL operator:
To correctly conigure the query to pull records containing customers from the America's region as well as Germany and Denmark, the ilters must be rearranged on the Filter line by left-clicking and dragging the Country Region ilter to the left of the Cust Year Of Birth ilter. Once the two geographic ilters are next to one another, clicking on the AND operator between both ilters switches the SQL operator to the word OR as shown in the following screenshot:
[ 44 ]
Chapter 2
[ 45 ]
The Query
Finally, parentheses must be added around both of the geographic ilter boxes to accurately ilter the dataset to the three geographic locations and customer age range of interest. Parentheses are added by clicking the arrow (— >) to the right of the word —) Filter in the Filter line. Once the arrow is clicked, the arrow changes direction (< and buttons for the parentheses, ( ), and Var options appear. To add parentheses around the geographic ields, hold Ctrl and left-click on the Country Name and Country Region ilters to highlight the ilters. Finally, click on the ( ) button in the ilter line to add the parentheses around the highlighted ields as shown in the following screenshot:
Multiple sets of parentheses can be added to the ilter line to create complex queries. Parentheses can be deleted by highlighting the parentheses, right-clicking it, and selecting Remove. [ 46 ]
Chapter 2
Variable ilters
Variable ilters are used to make a ilter dynamic when a Query section is processed. Developers and power users leverage the Variable ilter option to allow other users to specify the ilter criteria at runtime, where the Filter interface appears for each variable ilter set in the Filter line. The order in which the Variable ilters appear is set by ordering the ilters from left-to-right in the Filter line. Numeric values will appear in parentheses to the right of the ilter name to denote the rank in the Variable ilter order.
Continuing with the same example as previously shown, the Country Region is set to a Variable ilter by left-clicking on the Country Region ilter in the Filter line and selecting the Var option next to the ( ) option as shown in the following screenshot. Alternatively, the Variable ilter can be set by highlighting, right-clicking it, and selecting the Variable Filter option. Upon Query processing, the Country Region ilter interface will appear allowing for the coniguration of the ilter at runtime:
[ 47 ]
The Query
Filtering on request items Filters can be placed on any ield in the Request line, including calculated items. Continuing with the same example, a ilter can be added based on the total quantity sold calculation in the Request line. For example, to reduce the results of the query to a speciic range of items sold, the SUM(Quantity Sold) column is left-clicked and dragged from the Request line to the Filter line. The Filter interface appears and provides options for iltering. The Show Values ilter option is unavailable when iltering on a calculated item and therefore Custom Values or Custom SQL must be used to create the ilter.
The ilter can be set by completing the Filter assignment steps for Custom Values as demonstrated in the previous section to ilter the data as desired. After the ilter is set on the calculated item, the ilter appears in the Filter line at the far right and is separated from the rest of the ilters by double vertical lines (||), as shown in the following screenshot, to denote that the ilter is from a calculated Request item:
[ 48 ]
Chapter 2
Removing ilters
Filters are easily removed from a query by highlighting the ilter(s) in the Filter line and by clicking on the Delete key. The Ctrl and Shift keys can be used to select multiple items at a time from the Filter line. All of the ilters in the Filter line can also be removed by right-clicking on the word Filter in the Filter line and selecting the Remove menu item.
Sorting Many options exist for sorting data throughout each section of the software. Sorting in the Query section is easily achieved by dragging-and-dropping a ield from the Request line to the Sort line. Continuing with the example, the query is sorted to return the quantity of a product that is sold in descending order by dragging the Quantity Sold column to the Sort line. Once added, the Quantity Sold item appears in the Sort line with an arrow pointing upward denoting ascending order. Double-clicking on the Quantity Sold box in the Sort line switches the sort to descending order as denoted by the change in the arrow to point down as shown in the following screenshot. The sort will take place after the query has inished processing, where the data will be ordered in the Results section descending by the Quantity Sold column.
[ 49 ]
The Query
Query processing Queries are frequently processed by a user in daily interactions with the software. Multiple options exist to make query processing easy. Query processing is executed by clicking on the Process button in the Standard toolbar or by clicking on the Tools | Process Query | Current menu option. After the query has inished processing, the software will populate the Results section with the data requested in the Query section. The Status bar will show the number of rows returned from the query in both the Query and Results section after a query has inished processing.
In addition to simple processing, a few other options exist for processing multiple Query sections in a particular order. Using the previous example, the Q_Sales section is duplicated by right-clicking on the Q_Sales name in the Section window and selecting Duplicate Section. Repeating the process will add a third identical query. Since the section names must be unique, the software renames the section by adding a number to each of the duplicates. The example document now contains three Query sections allowing for the demonstration of the additional processing features of the software. Three processing options exist to support the processing of Query sections in the document. The following is a breakdown of each option: •
•
•
The Process All option is used to execute all or a subset of queries in the document. To manage the processing order and to remove Query sections from the Process All property, click on the Tools | Process Query | Processing Order menu. A window will appear for managing the process sections and order. A Query section can be moved up or down in the process order by using the arrow keys and the section can be added or removed by double-clicking the section name in the window. The Process Current property can execute from any section and will run the query attached to the active section that the user is viewing. If the section is a Dashboard or Report section, a Process All will be executed since the Dashboard and Report sections are Query section independent. The Process Custom property is used to process a subset of queries in a document. Once the Process Custom property is executed, a dialogue box appears allowing the user to check the Query sections to include in the process. After checking the sections and clicking on the OK button, each section is executed individually in the order that appears in the selection window. If the Process Custom property is executed when a Dashboard section is displayed, a Process All is executed. [ 50 ]
Chapter 2
Each process option can be invoked through the Tools | Process Query menu or by clicking on the down arrow next to the Process button in the Standard toolbar. Both process methods are shown in the following screenshot:
Holding the Alt key and clicking on the End key during query processing will invoke an emergency stop to the query. A dialogue box will appear once the query has stopped processing and will notify the user that the query has been cancelled. Queries may take a few seconds to a few minutes to stop processing.
Query options Multiple query options can be set in a Query section to modify the results returned from a query. The Query Properties window, as shown in the following screenshot, is opened by double-clicking the word Request in the Request line, or by clicking on the Query menu and selecting Query Options:
The commonly used features of this window are the Process options contained in the Process box. The following is a breakdown of each Process property:
[ 51 ]
The Query
•
•
•
The Return Unique Rows option is used to pull back a distinct list of values for the deined query. The Return First property limits the results returned from a query to a subset of rows. This feature is usually used to sample output from a query. Once the limit has been reached, a dialogue box will appear notifying the user that the query has reached the desired limit and will display the results returned from the query up to the row limit. The Time Limit property limits the amount of time a query is allowed to run in minutes. This feature is usually used to prevent runaway queries. Once the time limit has been reached, a dialogue box will appear notifying the user that the query has reached the maximum allotted time and will display the results returned before the time limit was reached.
Identifying metadata (table and column remarks) Table and column remarks are used to provide information on speciic tables and columns of interest. The remarks are setup and conigured in the OCE database connection ile and are customized to provide information to the user. The remarks are accessed by highlighting and right-clicking on the table or column of interest and selecting the Show Remarks menu option. A window appears with the remarks for the table or column. If multiple remarks have been created for an object, the remarks appear with tabs to allow navigation between the different sets of information as shown in the following screenshot:
[ 52 ]
Chapter 2
If a remark does not exist, a window appears stating that a remark does not exist for the speciied object.
Summary The Query section is the Interactive Reporting interface for returning data on-demand from a database. The goal of this chapter was to provide the business analyst with the tools necessary to effectively build and manage queries from a data model. The chapter began with an overview of the layout of the Query section. The chapter continued with information for building a query and coniguring Request items. The chapter examined and provided examples of the different iltering options including Show Values, Custom Values, Importing from a ile, and Variable ilters. The chapter addressed Query sorting as well as the different processing options for executing the Query sections in the document. Finally, the chapter closed with an overview of locating metadata in the document through viewing table and column remarks.
[ 53 ]
The Data Model The Data Model is a table or a collection of integrated objects that serve as the driver for building queries. Users are typically provided with data models that have been created and maintained by a development team for building queries, but environments exist where the user community has the ability to build and customize the data models for individual use. The goal of this chapter is to provide the business analyst with the knowledge to create and edit a data model, including the ability to modify Joins, manage Meta Topics, combine data from multiple queries, and import external content. The content in this chapter covers: • •
Creating a data model
•
Creating and modifying joins
•
Local results & derivable queries
•
Adding tables
•
Creating and editing meta topics Importing external data
The Data Model
Creating a data model A data model is created in the Query section of the document. A new Query section is added to the document by selecting the New Query item from the Insert Menu. When a new query is inserted into the document, the Insert Query window shown in the following screenshot appears for the selection of the database connection to use in the new query.
The Insert Query menu shows three options. The irst option appears if the developer of the document created a Master Datamodel section in the document. The master data model, typically created by developers, is used to centralize a model for reuse across queries and documents. The section is locked from editing directly in the Query section, and access must be granted to the Data Model section to edit a master data model. Selecting the model of interest from the drop-down box and clicking on OK will insert a new query using the master data model selected. If no master data models exist in the document, only the Existing Connection and No Connection options are present. The Existing Connection drop-down box provides a list of connections that are already in use in the document. Selecting the Existing Connection option, the connection of interest from the drop-down box, and pressing OK will add a new blank query to the document with the selected connection to the database. Finally, selecting No Connection will add a blank query to the document without a database connection. After a query is added to the document and the document is saved, the query appears in the Properties of the ile in the Workspace allowing the database connection to be changed as shown in Chapter 1, Editing Interactive Reporting ile properties. When a new Query section is added to the document, the query will appear in the Section Catalogue with the default name Query. The section is renamed using one of the three following options:
[ 56 ]
Chapter 3
Right-click method
Edit menu method
Double-click method
Right-click the section in the Section Catalogue.
Select Rename Section from the Edit menu while viewing the section.
Double-click the name of the section in the Section Title Bar.
Select Rename Section.
Change the section to the desired name and Select OK.
Change the section to the desired name and Select OK.
Change the section to the desired name and Select OK.
Duplicating a query A Query section or any section in the document can be duplicated from an existing section. The following two options demonstrate the methods for duplicating a section: Right-click method
Edit menu method
Right-click the section in the Section Catalogue.
Make the section of interest active in the document.
Select Duplicate Section.
Select Duplicate Section from the Edit menu.
Removing a query Query sections are removed from the document using one of the following two options: Right-click method
Edit menu method
Right-click the section in the Section Catalogue.
Make the section of interest active in the document.
Select Delete Section.
Select Delete Section from the Edit menu.
Conirm section delete by selecting Delete from the Delete Section conirmation window.
Conirm section delete by selecting Delete from the Delete Section conirmation window.
Building a data model Once a new or duplicated query has been added to the document, the query is easily built or modiied by adding tables from the Elements window to the main window of the document and then linking the tables through joins. [ 57 ]
The Data Model
If a master data model is used, the Data Model section must be edited to change the model in the Query section.
The Elements window The Elements window in the Query section displays the objects available to the user for use in a data model. The objects can be database objects (grouped by Interactive Reporting into a category called Tables), Local Results, and Derivable Queries. The following screenshot shows the Tables grouping expanded to a list of database objects. Highlighting and right-clicking on the word Tables provides the ability to fully qualify the table name by clicking on the Full Names option. Highlighting and right-clicking on an object name provides the ability to Refresh or re-sort the list of objects displayed.
The Tables section contains tables, views, and other database objects that can be read by Interactive Reporting for use in a Data Model.
Adding tables to the data model Tables are dragged and rearranged in the query section by highlighting the table name in the Elements window and dragging-and-dropping the table into the main window of the Query section. Continuing with the Sales model example from the previous chapter, tables are added one-by-one to the main window of the query as demonstrated in the following screenshot. Once a table is in the query window, it can be resized and rearranged as necessary.
[ 58 ]
Chapter 3
After the necessary tables are added and rearranged, the tables can be appropriately joined to one another to produce the results of interest. The default coniguration for the Web Client is to include the Auto join tables option in the query. If a number of unexpected joins appear when adding tables, access the DataModel menu, and select the Data Model Options menu item. On the General tab, uncheck the Auto join tables checkbox. Removing this option will prevent the Web Client product from attempting to determine joins between tables during the construction of the data model.
Joins A Join is a method of linking two database tables using a speciic set of logic to achieve a desired data result. It is essential for the user for building the data model to understand the tables and appropriate linkage between the tables before venturing into creating a custom data model. The incorrect linkage of tables in most cases will produce incorrect data from the database. After the necessary tables are added and rearranged, the tables can be joined by highlighting a ield in one table and dragging it onto an appropriate ield in the other table. Once a join between the objects is created, Interactive Reporting provides the ability to modify the join condition set between two tables in the data model. Double-clicking on the line connecting the two tables brings up the Join Properties window where the join can be modiied as shown in the following screenshot:
[ 59 ]
The Data Model
There are four main types of join conditions that can be set: •
•
•
•
The Simple join is used to join objects with matching values between columns. The simple equal join is the default displayed when two tables are initially joined. The Simple join can also be conigured for not equal, less than, less than or equal, greater than, and greater than or equal. The simple join is used when the desired result is used to display data that matches between the columns joined in both tables. For example, when the Sales igures for a speciic country are queried, a Simple join is used to produce only the Sales from the Sales table for the country iltered. The Left join is used to pull all records from a driving table and only the records that match from the joins in reference table. Interactive Reporting uses the word Left to specify the location of the reference table in relation to the driving table. Text is generated by the software to explain the behavior of the Left join using the actual table names, as shown in the previous screenshot. Using a Left join in the previous example will retrieve all rows from Products and only those rows from Sales that matches the data in the Products table based on the columns joined between the two tables. The Right join is similar to the Left join and it is used to pull all records from a driving table and only the records that match from the joins in the reference table. Interactive Reporting uses the word Right to specify the location of the reference table in relation to the driving table. Text is generated by the software to explain the behavior of the Right join using the actual table names, as shown in the previous screenshot. The Right join will retrieve all rows from Sales and those rows from Products that match based on the columns joined between the two tables. The Outer join is used to pull all the records from both tables and combining the matching data on the same line of the results and leaving columns of the non-matching results blank.
Once the join condition has been modiied and accepted, the sign in the middle of the join connecting the tables in the data model is updated to display the join condition selected. The simple join is denoted by the sign of the operator selected (defaulting to the = sign). The selection of the left join will display a +=, the selection of the right join will display a =+, and the selection of the outer join will display a +=+. The + sign provides a graphical aid to demonstrate the driving table in the query, where all rows will be pulled from the table closest to the + sign. In the previous screenshot, the outer join is not available for selection since Oracle does not support the outer join (+=+) option. Different database options are available based on the functionality of the database.
[ 60 ]
Chapter 3
The Topic View When working with data models and joining tables, users may want to view sample data to verify a column or to sample data in a table. The Topic View option allows the toggling of the object on the screen to provide a data preview. Right-clicking on the table and selecting the Detail View of the table will change the topic view from the list of columns to a sample view of the data in the table in a 'row by column' format as shown in the following screenshot. The table can be resized to make the viewing area larger and the scroll bar at the bottom of the table object can be used to scroll through the columns available.
Any joins made before switching to the Detail View will remain unchanged and the view can be changed back by right-clicking on the table and selecting the Structure View.
The Topic View options can be accessed from the DataModel menu by highlighting the table in the main window and then selecting the desired Topic View option.
Working with meta topics Meta topics are objects in Interactive Reporting that mimic the behavior of tables and are used to modify the presentation of the data model to the user. Developers typically create meta topics to simplify a complex data model and to group elements together in one "table" object. While business analysts typically do not leverage these features in working with the software, it is important to demonstrate the features if the need arises to edit a data model with meta topics.
[ 61 ]
The Data Model
The following screenshot shows the Sales model example with all of the tables used in the model joined together. The model is a typical data warehouse star schema model where all of the dimension tables are joined to the fact table in the middle of the model.
While the model in the previous example is in a simpliied format, the software provides the ability to hide the table joins as well as the ability to arrange in order, modify, hide, and rename columns in the data model to create a more attractive presentation of the model using the meta topic objects.
Creating meta topics A meta topic or collection of meta topics can be created from scratch or can be pre-populated by the software from an existing table, reducing the need to recreate the object from a blank object. [ 62 ]
Chapter 3
A blank meta topic is created by clicking on the DataModel menu and selecting the Add Meta Topic option. A topic window opens allowing for the topic to be named as shown in the left image of the following screenshot. In this example, the meta topic is renamed to Customer, and the topic will be used to create a combined view of the Customers and Countries tables to reduce the need to have two separate objects for customer data. Once the OK button is clicked in the Topic Properties window, the blank topic appears as shown on the right of the Customer table.
All object names must be unique across both meta topics and tables displayed in the data model.
The blank topic is now ready to accept ields, which are easily dragged-and-dropped into the meta topic window by highlighting a ield in any of the surrounding tables and dragging-and-dropping the ield into the window. Continuing with the previous example, the ields from both the Customers and Countries dimension tables are dragged-and-dropped to create a Customer meta topic with ields from each table.
[ 63 ]
The Data Model
The following screenshot shows the raw columns moved from the Customers and Countries table into the Customer meta topic, where the columns in the topic contain the original column names.
While the existing names are informative and provide traceability back to the source table, the ields are easily renamed by highlighting the item, right-clicking, and selecting the Properties option as shown in the left image of the following screenshot. The Properties window appears and allows the item to be renamed and modiied (as shown in the following screenshot) where the column name in the Properties window has been modiied to add the Cust preix.
[ 64 ]
Chapter 3
Promoting to a meta topic A meta topic can also be created by using the Promote to Meta Topic method, which creates a new meta topic from an existing table. In the following example, the Sales fact table was promoted to a meta topic by highlighting the Sales table in the data model, right-clicking, and selecting the Promote to Meta Topic menu item. The topic is created by the software with the preix Meta to distinguish the meta topic from the actual table name.
Editing meta topics The Properties window of the meta topic is used to rename the topic, and provides the ability to hide and reorder columns. The Properties window is opened by double-clicking on the title bar of the topic, and the window can also be opened by highlighting, right-clicking, and selecting the Properties option.
[ 65 ]
The Data Model
Columns are reordered by highlighting the column and using the Up or Down buttons on the left of the window. Fields with a * denote the columns shown in the topic and ields missing the * (to the left of the column) denote that the column is hidden. The ield can be double-clicked to toggle showing and hiding the ield, while the Show All or Hide All buttons can be used to show or hide all of the ields in the item list.
The previous screenshot shows the Properties window of the Sales topic, edited to hide the unnecessary ields, renamed to Sales Fact, and reordered to show the Amount Sold column before the Quantity Sold column. The properties of tables are very similar to meta topics, where the same methods of hiding, reordering, and sorting can take place. However, ields cannot be removed from a table but ields can be removed from the meta topic.
Fields are removed from the meta topic by highlighting the ield in the meta topic window, right-clicking, and selecting the Remove option.
Changing the data model topic view Three different data model views exist to toggle between the meta topic and original table view. The views can be changed by selecting one of the Data Model View options from the DataModel menu: Combined, Original, or Meta. The Data Model View selection option will stay grayed out in the DataModel menu until a table or topic is highlighted in the data model.
[ 66 ]
Chapter 3
The default for each Query section is set to the Combined view, where both the meta topics and original tables are shown. This view is used to setup and conigure meta topics by allowing the tables and topics to be shown at the same time in the same window. The Original view option is used to display only the view of original tables, while the Meta view displays only the meta topics. Continuing with the previous example, switching the data model view from Combined to Meta creates a view with only the Customer and Sales Fact objects as shown in the following screenshot:
Updating the data model As changes are made to the tables in a database, Interactive Reporting provides a simple and easy-to-use update feature to refresh the columns of the tables in the data model of a Query section. In the DataModel menu, the Sync with Database option updates the data model with the changes to each table in the data model. If at any time a column is deleted from any table and is used in the Request line of a query, Interactive Reporting will remove the column from the query if the column has not been edited or the software will display a database error noting an error running the query, if the column has been modiied in the Request line.
[ 67 ]
The Data Model
When the Sync with Database is completed, a summary of the impacted tables appears as shown in the following screenshot. Clicking on the Show Detail Information checkbox provides additional information on the table modiications as shown:
Changing the table deinition If there is an interest to replace an existing table with a new table, Interactive Reporting provides the ability to change the deinition of the table and then refresh the table with the database to change the old table to a new one. This situation commonly occurs when a user wants to leverage a new object created with columns of an old object as well as new columns. The table deinition can be modiied in the Properties window of a table, by right-clicking on the table of interest and selecting Properties. Once the Properties window is open, the table deinition can be hand-edited to change the existing table name with the name of the new object. After clicking on OK, execute the Sync with Database option from the DataModel menu and the object will update to use the new table from the database. If items from the old table are in the Request line and the column name stays the same, the Request items will not need to be updated. If the column names have changed, the columns in the Request line will disappear during the Sync with Database. To avoid having to replace the columns in the Request line after the sync, update the column deinition manually in the Request line by right-clicking on the column in the Request line and selecting Properties from the menu. In the Properties window of the Request line column, the deinition can be updated in a similar fashion as updating the table deinition. Update the column deinition by typing the new deinition into the window. Then run the Sync with Database option to update the table deinition of the query. The deinitions changed in the Request line will still exist after the refresh, if the Request items were correctly modiied. [ 68 ]
Chapter 3
Make sure to save the document before running the Sync with Database option to preserve the original model before the update is run. Changes cannot be reverted after the Sync with Database option has been executed.
Combining multiple queries in one model Interactive Reporting provides the ability to add external content into a data model from a ile or another query. This operation is completed through the use of local results or derivable queries. In each case, data from an outside source can be joined into a query to produce a desired dataset. The local results and derivable query methods are usually used when data not contained in the data warehouse is needed in a query for analysis.
Local results The Local results method is the use of an external source of data stored in a Results section or Table (either a table section or an imported ile of data). The local results imply that the data is a stored dataset inside Interactive Reporting and is not an object stored in a database. The local result is a processed dataset and must be updated before the query with the local result added is executed. Local results are imported into a query by right-clicking the Elements window and selecting the Local Results menu option from the right-click menu. When the menu item is selected, an additional grouping of elements appears called local results. When the elements section is expanded, the section names available appear for use in the query. The sections shown can be dragged-and-dropped into the Query section for inclusion in the query. Once the local results are added to the query, the object is joined to a table in the document similar to joining a database table by dragging-and-dropping the column in the local results to the appropriate table. Double-clicking on the join displays the Join Properties window as shown in the following screenshot:
[ 69 ]
The Data Model
The new addition to this window is the Filter Local Join option that appears at the bottom of the window. This feature allows the data in the local results to be used as the ilter criteria for the column(s) joined in the query. This feature is extremely useful as it allows for the quick generation of a list of ilters that can be easily refreshed and reused in a query.
Limitations of local results A few limitations exist with local results. The irst and main limitation is that a column from the local results cannot be modiied, sorted, or iltered in the query. The column cannot be a variable ilter, and the column cannot contain a data function in the query (such as SUM or AVG). These limitations make the working with the local results more dificult, but most limitations can be avoided with the way the data is conigured in the local results section of data.
Derivable queries The derivable query feature provides the ability to import another query from the document into Interactive Reporting. The Derivable Query option is very useful when columns in database tables do not directly join without modiication. While custom SQL can be used to achieve this task, it is much easier to create a derivable query of data and use that query in the model to facilitate the join condition. Another area where derivable queries are useful is when the data in a table in the query must be summarized before it is joined into a model. In this section, the derivable query can be built to summarize the data and then joined into the other query to produce accurate results. The derivable query does not depend on a locally stored set of data, but rather calculates the relationship and interaction with the database during database interaction (Processing or Filtering). This feature makes the derivable query attractive as it does not take up space in the document and the item does not have to be pre-processed unlike the local results feature. Similar to local results, derivable queries are imported into queries by right-clicking on the Elements window and selecting the Derivable Queries menu option from the right-click menu. When the menu item is selected, an additional grouping of elements appears called derivable queries. When the elements section is expanded, the section names available for use in the query appear, and the section can be dragged-and-dropped into the Query section for use. Once the derivable queries are added to the query, the object can be joined to a table in the document similar to joining a database table by dragging-and-dropping the column in the derivable query to the appropriate table. Once the query is conigured, columns from the derivable query can be added to the model. Unlike the ields from a local result set of data, ields from a derivable query can be added to the Filter and Sort line as well as modiied in the Request line. [ 70 ]
Chapter 3
Limitations of derivable queries While the derivable query features are extremely lexible, a few limitations exist. Unfortunately a derivable query can only be used on the same database connection as the main query. Therefore, the ability to switch across database platforms without database development is not accomplished with this feature. Additionally, the section importing the derivable query cannot contain a local results section.
Importing external data One of the unique features of Interactive Reporting is the ability to import Microsoft Excel documents, XML iles, tab-delimited text iles, and comma-separated text iles into Interactive Reporting. The imported ile acts as a table section where data can be analyzed, iltered, and manipulated similar to Tables (discussed later in the Results and Table chapter). Pivots and Charts can be added to summarize and analyze the external content, and the data is available for use in Reports and Dashboards. The content is also available for use as a local results section allowing for the use of the external data in a data model. There are many uses for using external content in a model, but the most common use is the ability to model scenarios of data not currently in existence in a reporting structure. For instance, a very common use for this feature is to model a new organizational structure. Since the software allows the external data to be easily updated, the scenario can quickly be modiied and the analysis can be rerun.
Importing a ile The Import File window is executed by accessing the File menu | Import Data from File. Upon selecting the ile import menu option, Interactive Reporting creates a new section similar to a Table section with the name of the ile as the section name. The ile appears in tabular format with the irst row from the ile as the column names and the rest of the content as data. Once the ile has been imported, the ile can be iltered, sorted, and analyzed similar to conducting data analysis on a Table section. When importing an Excel ile with multiple sheets, the software provides a window to select the desired Excel sheet for import.
[ 71 ]
The Data Model
Refreshing external data When content in the ile has been updated, processing the section similar to processing a query will refresh the content displayed in Interactive Reporting. If the ile no longer exists or cannot be found, the software will prompt to select a new ile to import into the document. The new ile will replace the column structure and data of the existing section.
Importing tips When importing a ile, there are a few areas to focus on to make sure the import works properly and with the correct datatypes (character strings, dates, or number formatting). Some of the tips are especially important to Microsoft Excel iles as they impact the way the data is displayed.
Fixing additional columns The irst and most common error experienced is when a ile is imported and additional rows and columns of information appear (usually blank) to the right and bottom of the dataset. This occurs because the ile identiies objects (usually character spaces) in the ile. The best way to remove this is to open the ile in Microsoft Excel and highlight the rows and columns outside the dataset and clear all of the content in those cells, which should remove any of the objects in the data.
Fixing datatype and join issues Another common issue is when the data in the imported ile does not get assigned to the correct datatype. When this occurs, the ability to ilter the data is impacted as well as the ability to join the data in the query with a matching column from a table. In the case of the join, the join fails to work even though the data displayed in both the ile and the table match visually. This issue is because the datatype of the ile does not match the query. The best way to ix the issue is to irst right-click on the column in the table of the query and select the Properties menu item to view the datatype of the column. Then save the import ile in comma separated or text format and view the import ile in a text editor to see if the column is encased in quotations. Usually in one case the datatype is a string and the other the datatype is a number. The easiest way to solve the issue is to edit the ile with Microsoft Excel and switch the datatype in the ile to match the table by editing the formatting of the cells. Once the ile has been updated, it can be refreshed in Interactive Reporting and the join should execute appropriately.
[ 72 ]
Chapter 3
Importing custom SQL iles The ability exists to use Interactive Reporting to run a custom SQL statement. Previous Interactive Reporting versions did not have any easy way to refresh the SQL in the document, but more recent versions of the software allow for a refresh from the source ile. In a new Query section, the File menu| Import Data | SQL menu option allows the selection of either a .txt or .sql ile to be added into the blank query. When the ile is selected, a window appears to set the number of columns in the Request line of the document. After specifying the number of columns, the Filter and Sort lines are removed from the Query section and the Request line appears with the column names as Column 1, Column 2, through the inal number of columns. The following is an example of a query with an imported SQL ile:
Refreshing imported SQL In the previous screenshot, the Imported SQL Statement graphic under the Request line can be right-clicked and the Refresh or Delete menu items can be selected from the right-click menu to update the SQL from the ile or to remove the imported SQL from the document. If the ile is removed or if the system cannot locate the ile during an imported SQL refresh, then the Import SQL File window will reappear to allow the selection of the ile. [ 73 ]
The Data Model
Summary Data models provide the building block for creating and building queries in Interactive Reporting. The goal of this chapter was to prove the business analyst with the knowledge to create and edit a data model, including the ability to modify joins, manage meta topics, combine data from multiple queries, and import external content. The chapter began with an introduction on creating a data model and the steps to add tables from the Elements window. The chapter continued with an introduction to joins and the steps to create and edit join conditions between tables. The chapter provided information on creating and editing a meta topic as well as the steps to refresh the table deinitions in the data model. The chapter concluded with an overview of using local results, derivable queries, and importing external content for use within the document.
[ 74 ]
Advanced Querying and Filtering The lexibility to create complicated queries extends beyond the simple querying, iltering, and data modeling techniques shown in the previous chapters. Interactive Reporting provides the lexibility to take advantage of some advanced features to create reports and perform analysis quickly and easily. This chapter focuses on providing the business analyst with the knowledge to implement advanced querying and iltering techniques to enhance reporting and to decrease manual efforts. The chapter covers: • •
The generation of SQL in Interactive Reporting
•
Commonly used Oracle functions
•
Custom SQL
• • •
Creating and modifying column deinitions Advanced iltering techniques Combining queries The query log and exporting SQL
Structured Query Language (SQL) Structured Query Language is a common language used to manage data within a database. Each database has similarities and differences in the SQL syntax, with some databases providing more lexibility and functionality than others. Business intelligence vendors focus on providing software solutions that interact with different database platforms without the need for users to understand the speciic database containing the data of interest.
Advanced Querying and Filtering
Interactive Reporting provides the full capability to build and run queries off of a data model without the need to understand the underlying database. The software also provides the user with the ability to edit and leverage SQL inside the query section, allowing users to maximize the analytical capabilities of the product.
How SQL is translated from Request, Filter, and Sort The previous chapters focused on building the data model and building a query using the drag-and-drop interface of the product. When the data model is conigured, the model serves as a representation of relationships between the different table objects. As items are added to the Request and Filter lines, the software dynamically builds the SQL for the query and includes only the tables of those items in the query. The dynamic building of SQL is a default setting in the product called Use automatic join path generation. The setting can be changed on the Join tab of the DataModel to modify the DataModel feature if desired.
If a query does not use columns from a table in the data model, the table is not included in the SQL that is sent to the database. Additionally the join deinitions between the two tables in the data model is also not included if the tables are not used in the query. The approach used by Interactive Reporting is extremely lean and effective SQL, which supports editing, debugging, and eficient query execution. The translation of the query section to SQL is straightforward, where Interactive Reporting adds items in the Request line to the SELECT statement. The items from the Filter line are added to the WHERE clause, and the items in the Sort line are added in the ORDER BY clause. As additional features of the Query section are used, Interactive Reporting continues to build the SQL of those features with the same lean approach.
Advanced request items Many users require the ability to perform further analysis on the data columns stored in the data model, where grouping and editing columns is a common practice. SQL provides the lexibility to edit and manipulate the items in the Query section, where many items can be grouped and derived from a single column. Interactive Reporting provides the lexibility to easily create these groups and derivations by modifying the deinition of the column in the Request line.
[ 76 ]
Chapter 4
Modifying column deinitions Interactive Reporting leverages a JavaScript syntax programming language throughout each product section in computed items and custom programming. However, the Query section is the only section in the product that requires the use of database-speciic SQL syntax for computed items or modiications to items in the query. Since the SQL is generated from the query and sent to the database, any modiications or computed items are passed to the database similar to the columns added to the Request line. New items can be added to the Request line by rightclicking on the Request line and selecting the Add Computed Item menu option. The Deinition can be added in the blank Properties window that appears, as shown in the following screenshot:
The top button on the right of the screen allows for the addition of a predeined function to the request item. Clicking on the Functions... button opens a new window with a list of functions for selection. The function selection window and the properties window include a Reference... button allowing the user to populate the column deinition from the model without having to manually type in the column deinition. Clicking on the Reference... button pulls up the Reference selection window, allowing the user to select the table and column contained in the data model. Upon selecting the function, a function description and an interface for adding the function parameters appears in the selection window. Clicking on the Reference... button brings up the reference window for selecting a column.
[ 77 ]
Advanced Querying and Filtering
Both the Functions and Reference windows are shown in the following screenshot:
Typically, users add items to the Request line irst and then edit the item properties by double-clicking on an item to bring up the Properties window. By adding an item to the Request line before editing, the item deinition is pre-populated in the Deinition of the Properties window.
While leveraging the Functions window to modify items is effective, the lexibility exists to leverage user-deined SQL deinitions to modify Request line items. The following sections provide information and basic examples of commonly used SQL functions that can be easily implemented by users. The examples of the functions are created using Oracle SQL syntax and include examples from the Sales model sample.
Concatenation Many users leverage the concatenation function to join together two or more sets of characters or columns. In Oracle, the concatenation operator is deined by the || character. The concatenation function is commonly used when users concatenate two ields separated by a hyphen for concatenating a code ield with a description ield. For example, the concatenation of the product name and product description in the Products table with a hyphen is demonstrated as follows: Products.Prod_Name||' – '||Products.Prod_Desc. All character strings used in Oracle column deinitions require single quotes 'STRING' around the character string. [ 78 ]
Chapter 4
String manipulation Users frequently make modiications to string ields in a query. The Substring, Trim, Upper, and Lower functions are commonly used to manipulate a string of characters. The Trim function is used to remove a set of characters or blank spaces from the beginning or end of a column. A common use of the Trim function is to remove leading and trailing spaces from a column speciied by: TRIM(Products.Prod_Desc). The Substring function is used to break out a particular subset of characters in a column, where the irst argument in the function is the column of data to subset, the second argument is the starting character of the desired subset, and the third argument is the number of characters forwarded to include in the subset. An example using the Substring function is taking the irst ive digits of the Customer Postal Code speciied by: SUBSTR(Customers.Cust_Postal_Code,1,5). The upper and lower functions are used to convert the case of the ield to all uppercase characters or all lowercase characters. Both functions accept one argument and are created as follows: UPPER(Customers.Cust_Last_Name) and LOWER(Customers.Cust_Last_Name).
Value replacement Users commonly create columns that group or replace values in a ield with another value. The most common functions to replace speciied column values with other values are the NVL and Decode functions. The NVL function is used to replace a null value in a column with a deined value. The irst argument of the function is the column of data and the second argument is the replacement string. An example is NVL(Promotions.Promo_Name, 'No Product Name'). The Decode function can also be used to replace null values, but the function is more commonly used to create a user-deined column that replaces values in a ield with speciic user-deined values. The following example is used to demonstrate the Decode function: DECODE(Times.Calendar_Month_Number, '01', 'January', '02', 'February', '03', 'March', 'Other'). The irst argument in the function is the data column, the second is the value identiied for replacement, and the third is the value to use for replacement. The second and third arguments may be repeated for as many values as desired. The inal argument may be included to serve as the default value for all items that are not deined for replacement. If the inal argument is omitted, the values in the column not decoded will appear as null. However, this is mitigated by using the data column in the irst argument also as the inal argument to replace the non-decoded values with their original values. [ 79 ]
Advanced Querying and Filtering
Date/time functions Databases provide many helpful functions for modifying Date/Time in queries. The most commonly used functions include To_Char, Add_Months, To_Date, and Last_Day. While the previously mentioned Decode function can be used to manually look up and replace dates from a column, the following functions provide a better approach for transforming dates and time. The To_Char function is used to convert a date or number into a string. The function is commonly used to transform dates into a set of characters using database-speciic parameters. There are many parameters for both numeric and text date conversion, where parameters can be combined to create the desired outcome. For example, To_Char(DATE, 'MM-MON') will return the date input into the function as a two-digit month number, a dash, and the three-character abbreviation of the month for a given date. The To_Date function is used to convert a string of characters into a date. The function leverages the same database parameters highlighted in the To_Char function. The irst argument of the function is the string to convert and the second argument is the set of parameters arranged in the format of the date that is passed in, providing the database with instructions for transforming the string into a date. For example, the TO_DATE('2009-02-01','YYYY-MM-DD') function converts the '2009-02-01' string to the date/time format for February 1, 2009. The Add_Months function is used to add or subtract months from a date. The function takes two arguments, where the irst is a date and the second is the number of months to add or subtract from the date entered in the irst argument. For instance, ADD_MONTHS('15-DEC-2009', -1) returns '15-NOV-2009'. The Last_Day function takes a date or string as an argument and returns the date converted to the last day of the month. For instance, LAST_DAY(sysdate) returns the last day in the current month, where sysdate is the function used to return the current system date and time.
Nesting functions Functions can be nested allowing the use of multiple functions together. For example, the output of the nested functions Add_Months(Last_Day('15-DEC-2009'),3) is '31-MAR-2010'. Functions can be nested together as long as the datatype of the data being passed through each function is properly conigured for the function.
[ 80 ]
Chapter 4
Additional information on Oracle functions and SQL can be found at www.oracle.com or various references throughout the Internet.
Datatypes Request items also provide the ability to modify the datatype of the ield in the Query section. Columns pulled into the Request line are automatically assigned a datatype in Interactive Reporting, but datatypes may also be changed to support the modiications made to the Request item in each query. In the request item Properties window, clicking on the Options button displays the datatype selection drop-down box as shown in the following screenshot:
If a date ield in the Request line is changed from a date to a character, the datatype for the request item must be changed from a date selection to one of the string datatypes or to Automatic to allow Interactive Reporting to successfully process the data.
Advanced iltering
The Filter window contains advanced options to provide additional lexibility for iltering in a query. The Advanced Filter Options provide the ability to add user-deined SQL to the ilter condition as well as the ability to create a SubQuery or import a list of ilter deinitions into the Filter window as demonstrated in the Chapter 2, Filters section.
[ 81 ]
Advanced Querying and Filtering
Custom SQL ilter option
The Custom SQL ilter option allows the user to leverage SQL to create a custom-deined ilter in the Filter window. When the Custom SQL button is clicked from the Filter window, the ield deinition of the ilter is shown in the editable textbox as shown in the following screenshot:
While adding Custom SQL to the interface, both the left and right-hand side of the operator can be edited to drive the desired outcome. A very common and useful example of using Custom SQL in a Filter is to leverage dynamic date functions for queries that need to be run on multiple occasions for a constant duration of time. For example, the Custom SQL feature can be used to ilter a set of data for a subset of time (such as the last three months). In leveraging the example in the previous screenshot, the Custom SQL window is modiied to Times.Time_Id > Add_months(Last_Day(sysdate),-3) to produce this result without needing to change the Filter date condition at each runtime. The Filter window can be resized by grabbing the image in the lower right-hand corner where both scroll bars meet and dragging the window to the desired size. Carriage returns can be added into the Custom SQL textbox by holding the Shift key while pressing Enter.
SubQuery option Another feature shown in the Advanced section of the Filter window is the option for driving the ilter condition from a SubQuery. A SubQuery is an embedded query inside a SQL statement that drives a speciied behavior. In Interactive Reporting, the SubQuery option provides the ability to set the ilter condition equal to values returned by a separate query. [ 82 ]
Chapter 4
Clicking on the SubQuery button in the Filter window brings up a new Query section with the data model section of the query grayed out and the word SubQuery shown in the upper left-hand corner of the data model as shown in the following screenshot. The SubQuery title appears selected and indented in the Section Catalogue with the title SubQuery.
From the SubQuery interface, a single item may be dragged into the Request line to supply the main ilter with the appropriate values. Multiple items may be dragged into the Filter line to narrow the SubQuery to the desired range of values. Upon processing, the SubQuery runs irst by creating a list of values used in the ilter condition.
[ 83 ]
Advanced Querying and Filtering
Custom SQL SubQuery A SubQuery can also be created manually by leveraging the Custom SQL ilter option providing the lexibility to add user-deined SQL to modify the ilter condition. To create a custom SubQuery, click on the Custom SQL button in the Filter window. The expression can easily be added to the Filter window as shown in the following screenshot:
Custom SQL and custom join conditions Interactive Reporting provides the ability to edit all of the SQL in the query by leveraging the Custom SQL option along with editing the column deinitions in the Request line. The Custom SQL window allows for editing all of the SQL in a query from the FROM statement forward, where this window can be used to create userdeined SQL as well as override the rigid join conditions created by the software through creating custom join conditions. To open the Custom SQL window, click on the View menu and select Custom SQL. The window opens to an editable textbox as shown in the following screenshot:
[ 84 ]
Chapter 4
Custom SQL requires a few additional steps for building and maintaining queries where custom logic and custom join conditions have been added. The following provides information on developing and processing Custom SQL: • •
•
•
•
•
Custom SQL overrides the query only when the Custom SQL window is open. If the Custom SQL window is closed, the SQL built by Interactive Reporting is submitted to the database during processing. Items in the SELECT statement cannot be edited in the Custom SQL window. Request line items must be modiied by closing the Custom SQL window by clicking on the Close button in the Custom SQL window or by using the View menu and clicking on Custom SQL. Once the Custom SQL window is closed, the Request items can be added, removed, or modiied. After the Custom SQL window has been opened for the irst time, the window retains the last manual change by the user. Once a change has been made to the query through editing the Request line, Filter line, or Sort line; the Custom SQL window must be updated by manually editing the SQL in the window or by clicking on the Reset button. Clicking on the Reset button will remove all of the manual changes made to the Custom SQL window and will reset the query to the default software driven SQL based on the model and query design. Frequently backing up the SQL changes to a text ile is advised when maintaining a model using Custom SQL. The Custom SQL window shows the tables used in the query with the word From as the qualiier. The From qualiier is used by the software and must be followed if you are manually modifying the SQL to add another table from the data model in the query.
Variable ilters work with Custom SQL and behave exactly the same as with the default mode. A variable limit is denoted in the Custom SQL window with the VarLimit qualiier in front of the name of the variable ilter.
Custom join conditions In building data models, Interactive Reporting does not provide the ability to deine Custom Join Conditions between tables in the drag-and-drop interface. However, Custom SQL may be used to create custom join conditions between database objects. If there is a need to deine custom join conditions, the best approach is to design the model and query irst in the drag-and-drop interface. By building the model irst, the join between the two columns is easily modiied from the initial setup in the Custom SQL window to now include the custom join conditions. The management of the custom-deined joins may be tedious, but the lexibility to deine the joins provides the ability to integrate sources of data with unlike column deinitions. [ 85 ]
Advanced Querying and Filtering
Combining queries When two or more separate queries need to be combined into a single dataset, Interactive Reporting provides an interface for combining queries using the Union, Union All, Intersection, and Minus operators. In SQL, these speciic operators are speciied between two queries driving the behavior of interest. Each operator is deined as follows: •
•
• •
The Union operator combines distinct records between both queries. If the same record exists in both queries, the record is only returned once from the database. The Union All operator combines all the records between both queries. The Intersection operator returns the rows that match between both queries. If the same record appears in both queries, the record is returned. If the record does not match, it is excluded from the query results. The Minus operator returns all of the records from the irst query that does not have a match in the second query. The order of the queries is important where the irst query is the driving query and the second is used to exclude records from the irst.
Using the Sales model as an example, the best method for combining sales and cost into the same dataset is to combine each separate query by using a Union All statement. To combine queries in Interactive Reporting, click on the Query menu and select the Append Query option. When a second query is appended to the irst, the Sort line is removed and replaced with the Union Controller as shown in the following screenshot:
[ 86 ]
Chapter 4
The Union Controller is similar to the Sort line and provides the ability to manage the combination of queries in the same document. Notice in the Union Controller line the parentheses ( ) option also appears providing the lexibility to add parentheses to perform the operations in a speciic order.
[ 87 ]
Advanced Querying and Filtering
Notice the two tabs shown in the previous example have one with the name Sales and the other Cost. These tabs drive the toggle between the appended queries, where the highlighted tab is the active model. The tabs identify the query name and can be renamed by right-clicking and selecting Rename.
Interactive Reporting provides signiicant lexibility for building the data model for appended queries. In the previous example, notice the model has both the Sales and Cost fact tables joined sharing the same dimension tables. Since Interactive Reporting dynamically builds SQL as Request and Filter items are added, the model shown in the example is only used to show relationships between tables and is not a representation of the inal SQL for the query. [ 88 ]
Chapter 4
Each query in the model is easily built from the collection of tables without the need for duplication of tables or management of multiple models, making the maintenance of the model much easier than the traditional methods. In the previous example, the query will pull in the sales and cost of products by iscal year allowing the combination of data in the same dataset. In this example, the numeric columns are separated into two separate columns. When combining queries, each column in the inal dataset requires the columns that make up the inal column to use the same datatype for the column. The datatype for each element can be edited through the Properties window of the Request item.
Conversely, the following example shows another approach commonly used with combined queries where the numeric column is combined into a single Total column. In addition, a manually created Type column is added by the user to distinguish the type of record for each line in the query.
[ 89 ]
Advanced Querying and Filtering
The query log and exporting SQL The Query Log is an extremely useful resource for debugging and understanding queries sent to the database. When the Query Log is opened, the log will record any query executed from the software and allows the user to copy the contents to another utility for further analysis. The Query Log is opened by selecting the Query Log option in the View menu. The log opens in a new window embedded in the tool and contains a table with two columns: a number of the order the query was run and a column to capture the query sent to the database. The following screenshot shows an open Query Log with a query processed.
The SQL of a Query can also also be easily exported to a ile through the File menu. To export SQL to a text ile, access the File menu | Export |SQL option and a window will appear to save the document to a user-deined location.
Summary This chapter focused on providing the business analyst with the knowledge to implement advanced querying and iltering techniques to enhance reporting and to decrease manual efforts. The chapter began with an introduction of SQL and the translation of the Request, Filter, and Sort lines of the query into SQL. The chapter identiied the methods for adding and modifying custom user-deined request items, and it addressed the methods for creating user-deined ilters through SQL. The chapter explored the lexibility of adding custom join conditions and editing the SQL of the document through using Custom SQL. The chapter concluded with the methods used to combine multiple queries into one dataset for analysis.
[ 90 ]
Results and Tables This chapter provides an in-depth view of the functionality and features of both the Results and Table sections. The Results section is the main driving source of data for presentation and analysis of a dataset from a query, and the Table section is created to subset and to perform operations on the returned dataset. Results and Table sections are similar in functionality and are commonly used by a business analyst to perform quick iltering and data analysis on the returned dataset. The goal of this chapter is to provide the business analyst with the knowledge to perform analysis in a Results and Table section on the data returned from a query. The content in this chapter covers: • •
An overview of the Results and Table section
•
Filtering
•
Grand and break totals
•
Adding and modifying content
•
Sorting Creating computed items
Results section When a new Query section is added to the document, Interactive Reporting automatically creates a Results section to accompany the query. When a Query section is processed, the data result produced by the query is stored and presented in the Results section. The data from each Request line item in the query produces a column of data in the Results section.
Results and Tables
The Results section looks like a spreadsheet where the data returned by the query is displayed in a 'row–by-column' format as shown in the following screenshot:
The Results section is the main source of data for any section used to analyze and present data from the accompanying query. Results sections provide the ability to modify, ilter, sort, and analyze data returned from the Query section. Any changes to the data contained in the Results section will impact the data displayed in all of the sections using the Results section as a source, including Tables, Pivots, Charts, Dashboards, Reports, and Queries with local results.
The Tables sections While each query contains only one Results section, Table sections are used to create subsets of data from the Results section. Tables are commonly used by the business analyst to create multiple presentation sections displaying different datasets from a single query. The Table section receives data from a Results section, and Table section functionality is nearly identical to the Results section. Multiple tables can be added underneath each query allowing for the segmentation and iltering of data from the Results section. [ 92 ]
Chapter 5
Creating a table section Tables are added to a document through selecting the New Table item from the Insert menu. When a new table section is added the document, the table will appear in the Section Catalogue with the default name Table. Renaming the section is consistent with other sections, where the section is renamed using one of the three following options: Right-click method
Edit menu method
Double-click method
Right-click the section in the Section Catalogue and select Rename Section.
Select Rename Section from the Edit menu while viewing the section.
Double-click the name of the section in the Section Title Bar.
Change the section to the desired name and select OK.
Change the section to the desired name and select OK.
Change the section to the desired name and select OK.
Interactive Reporting uses a concept of a Parent section for all of the sections added to the document except Data Models and Dashboards. The Parent section identiies the section that is supplying data to the section. When a table or other section is added to the document, the section that is active at the time the section is added to the document becomes the Parent section of the new section. This impacts adding tables since tables can be added with another table section as its parent. The following example demonstrates the need to use caution when adding sections to the document. For example, two tables are added to a document to split a Results section by geographic location for sales reporting. The irst table is added with the Results section active and then the section table is added when the Table section is active. When the irst table is iltered to the USA location, then the data in the irst table ilters appropriately. However, when an attempt is made to ilter the second table to South America, the only geographic ilter available in the second table is USA and the data in the second table is iltered to USA data. Since the second table was added to the document when the irst table was active, the irst table became the parent section for the second table. Therefore, the second table is linked to the data from the irst table and not the Results section. When the second table was added to the document, the second table should have been added with the Results section active to appropriately conigure the tables for the desired result. While the Interactive Reporting Web Client software does not provide the ability to change the Parent section of a document, a developer utility exists called the Hyperion Dashboard Studio Optimize Utility. The Optimize Utility can easily change the Parent section of the document without any impact to the report. Developers have access to the software and they can use the tool to change the Parent sections as desired.
[ 93 ]
Results and Tables
Duplicating a table A Table section or any section in the document can be duplicated from an existing section. The following two options demonstrate the methods for duplicating a section: Right-click method
Edit menu method
Right-click the section in the Section Catalogue.
Make the section of interest active in the document.
Select Duplicate Section.
Select Duplicate Section from the Edit menu.
Removing Table sections Table sections are removed from the document using one of the following two options: Right-click method
Edit menu method
Right-click the section in the Section Catalogue and select Delete Section.
Select Delete Section from the Edit menu.
Conirm section delete by selecting Delete from the Delete Section conirmation window.
Conirm section delete by selecting Delete from the Delete Section conirmation window.
When a Table section is removed, all of the sections with the deleted table as a parent will also be removed from the document. The software will prompt to conirm the deletion of the section and the dependent sections. An example of the conirmation window is shown in the following screenshot:
Removing Results sections The Results section can be deleted similar to deleting a Table section, where all of the sections with the Results section as a parent will also be removed. The Results section cannot be removed without removing the parent Query section tied to the Results section. When a Results section is deleted, Interactive Reporting will prompt with a conirmation window similar to the conirmation window in the previous screenshot. [ 94 ]
Chapter 5
Adding and modifying content While the Results section is populated when a query is run, a Table section is initially blank with no columns added. Columns are added and rearranged in a table and results by manipulating the columns shown in the Data Layout of the section. The Section Title Bar controls toggling the Data Layout, Filter, and Sort lines of the table and results section by clicking on the button in the bar to show or hide the window. The following screenshot shows the Section Title Bar buttons for a Table and Results Section:
Data layout The Data Layout line drives the order of the columns in the section. The column order of the Results section is initially set by the order of the columns in the Request line of the query before the irst process. After a query has been processed for the irst time, new columns added to the query appear at the end of the Results section regardless of where the columns are added in the Request line. In addition, columns modiied in the Request line do not impact the position of the column in the Results, where the column stays in the same position in the Results section regardless of the operations performed to the properties of the ield in the Request line. Since the table starts with a blank layout, columns are added to a table by dragging-and-dropping elements from the Elements window into the table. The following screenshot is an example of the Elements window in a Results and Table section:
Columns can be removed from the data layout by highlighting the column in the Data Layout and then right-clicking and selecting Remove, selecting Remove from the Table menu or by pressing the Delete key. [ 95 ]
Results and Tables
Auto-populating table columns A common request by business analysts is to have the Table sections to automatically receive columns added to a query. As new columns are added to the query and processed to the Results section, the default setting in the Table section is to add columns to each Table section manually. However, a menu item in the table menu exists to AutoAdd Columns to the Table section of interest. Selecting the automated addition menu item will add the new columns into the Table section when the columns appear in the Parent section of the table.
Moving columns Columns can be rearranged in the Results and Table section at any time without an impact to the data in the section or any related sections. Columns are moved in the Results section by highlighting the data grid or bar above the title of the column and dragging the column to the left or right of another column in the Results section. In addition, the column can also be moved by highlighting the name of the column in the Data Layout window and dragging-and-dropping the column name to the left or right of other columns in the window.
Hiding/showing columns Users can hide columns by highlighting the column, right-clicking, and selecting Hide Column from the menu, or by highlighting the column, clicking on the Results menu and selecting the Hide Column menu item. The column will not display in the Results section, but it is still available for use in other sections where the table or results is the Parent section. The Results menu also provides the ability to unhide any column that was previously hidden. To unhide columns, click on the Results menu and select the Unhide Column menu item or right-click in the data grid of the Results section and select the Unhide Column menu item. Both operations bring up a window with the list of hidden columns in the results section (shown in the following screenshot). Multiple columns can be highlighted in the window and once the selection has been made and the OK button is clicked, the columns return to the Results section.
[ 96 ]
Chapter 5
Identifying computed items Columns called Computed Items are created throughout the sections of the document and contain a custom deinition that commonly leverages other columns in the section. These columns are displayed in Blue with Italics in the Data Layout line (shown in the following screenshot) to provide a distinction between custom-created columns and columns from the Query section.
Removing columns Columns are removed from the Results and Table section through the use of one of the following two methods. The irst method is by removing the column from the Request line of the Query section. Removing a column or set of columns from the Request line is completed by highlighting the column in the Request line, right-clicking, and selecting Remove. Once the column is removed from the Request line, the column will be removed from all related sections upon the next query processing. The second method of removing a column from a Results and Table section is by removing the column directly from the section. This method is most commonly used to remove computed items column from the section, but the ability exists to remove an item generated by the query. A column is removed from a Results and Table section by highlighting the column data, right-clicking, and selecting the Remove Column menu item or by highlighting the column name in the Data Layout window, right-clicking, and selecting the Remove menu item. A general best practice is to remove columns from both the Query section as well as the Results section to reduce user confusion and streamline processing.
Removing a column from the Query, Results, or Table section may have an adverse impact on other sections of the document due to the use of the column throughout the other sections of the document. When a column with a dependency throughout the document is deleted, Interactive Reporting prompts the user with an alert window showing the dependencies and presenting a decision to continue or cancel the current removal request.
[ 97 ]
Results and Tables
As an example, removing a column from a Query section that is used in a Pivot and Chart section will generate an alert window showing the section dependencies and presenting the Remove or Cancel options shown in the following screenshot:
By clicking on the Remove button, an additional alert window appears for Pivot and Chart sections presenting the option to Keep or Remove the column from the individual section as shown in the following screenshot:
Selecting the Remove option removes the column from the individual section as well as the other sections. However, selecting the Keep option keeps the column in the section of interest, but switches the Refresh Data option in the Pivot or Chart section from Auto-Refresh to Manually. The impact to the document when the Refresh Data change is made is that the individual section no longer updates after a Query is processed, creating a static view of the data at that point of time. The refresh feature is important if the user is interested in saving a snapshot of data in the Chart or Pivot sections.
[ 98 ]
Chapter 5
Filters Filtering in the Results and Table section provides the user with signiicant lexibility to add, modify, and remove custom ilters without the need to reprocess the query. Since the query does not need to be rerun, iltering is quick and easy in the section. In addition, Interactive Reporting documents can be saved to the local workstation populated with data allowing the document to be taken ofline where the user can continue to perform iltering and analysis on the data stored in the document without needing to connect back to the database.
Creating ilters Filters can be created in a Results and Table section through the different options shown in the following table: Double-click method
Drag-and-drop method
Right-click method
Double-click the column of data in the Results section.
Highlight the column of data in the Results or Table section.
Highlight the column of data in the Results or Table section.
Drag-and-drop the column of data into the Filter line.
Right-click and select the Filter menu item.
The Results and Table section ilter looks like and, with minor exceptions, performs the same as the Query section ilter. Key differences include: •
•
•
The Results section ilter interface is limited to only the Show Values and Custom Values ilter methods, whereas the Query section ilter interface provides the ability to add Custom SQL as a ilter method. The inability to change the name of the ilter exists, prohibiting the ilter to be a different name than the column name. However, a computed item can be created to create a copy of the column with a different name or a column can be duplicated in the Query Request line but renamed to a different name. The Filter line of the Results and Table section does not contain the ability to add variable ilters or change the ilter operators from AND to OR. The Results and Table section ilters are defaulted to the AND logic, where each additional ilter will reduce the dataset by the condition added. The following is an example of the Results and Table ilter line with ilters populated.
[ 99 ]
Results and Tables
•
The Results and Table ilter interface contains a button to open the Options menu instead of the Advanced button, shown in the Query section ilter interface.
The Options menu (shown in the previous screenshot) of the Results section ilter interface provides an opportunity to modify the Loaded Value Settings of the ilter interface to switch from the default Load from Database setting to the Load from File setting. The Load from Database setting in this case populates the Show Values ilter option with the distinct set of values from the column in the Results section rather than a database. After setting the ilter condition and clicking on the Ok button, the ilter is set in the Results section. Filters can easily be moved in the Filter line by highlighting the ield and dragging-and-dropping the column to the left or right of other ilters.
Filters on multiple sections Once ilters have been added to the Results and Table sections, other sections of the document that leverage data from the Parent sections are refreshed with the changed data (unless the refresh setting of a section is changed to not automatically refresh after data changes). When modifying a query on an existing document, the user should identify all of the ilters used in each section and modify the ilters as necessary.
[ 100 ]
Chapter 5
Status Bar The Results section's Status Bar contains two helpful indicators to aid with the identiication of data returned by the query and iltered in the Results and Table section. The irst indicator shows the number of rows currently displayed in the results section. The irst is the number of rows displayed out of a total number of rows returned from the query. The row count indicator is helpful to identify the number of records reduced by the Results section ilter, and the indicator is helpful during troubleshooting data discrepancies to make sure an inadvertent ilter is not added to the section. The second indicator identiies the timestamp for the last time the section was populated with data. An example of the Status Bar for the Results and Table section is shown in the following screenshot:
Filter performance When ilters are set in the query section, the data is iltered by the database before the data is returned to the Interactive Reporting Web Client. Filtering in the Results and Table section requires the respective section to reprocess after each ilter change. For example, a Results section with large amounts of data may cause a delay in the use of the software until the iltering of data is completed by the local workstation. Any sorting, totals, computed items, and all dependent sections will also be refreshed possibly adding to the delay caused by the ilter operation.
Sorting Sorting data in the Results and Table section is a very common and lexible operation allowing quick add, modify, and remove Sort conditions to the section without needing to rerun the query to refresh the dataset. The Sort line of the section is very similar to the Sort line of the Query section. Items are added to the Sort line of the Results and Table section using one of three methods: Right-click method
Drag-and-drop method
Double-click method
Highlight the column of data or column name
Highlight the column of data or column name
Double-click the column header name
Right-click and select either the Sort Ascending or Sort Descending menu item.
Drag-and-drop the column of data into the Sort line.
[ 101 ]
Results and Tables
Each of the methods clear out the existing sort option except the drag-and-drop method, which adds the column to the Sort line without clearing the other sorts created. The column order in the Sort line identiies the sort order of the columns driving the sorting of the dataset. Columns are reordered by highlighting and dragging-and-dropping items to the right or left of another item in the Sort line. The columns are toggled between ascending and descending order by doubleclicking the column name in the Sort line to toggle the arrow to point up or down. Once columns are rearranged or the ascending or descending method is changed, the word Sort in the Sort line is switched to a beveled Sort Now button as shown in the following screenshot. Clicking on the Sort Now button will execute the sort modiications for the changes made in the Sort line:
Items are removed from the Sort line by highlighting, right-clicking, and clicking the Remove menu item, or by highlighting the item in the Sort line and pressing the Delete key.
Sorting performance When a Sort is conigured in the Query section, data is sorted by the database and is returned to Interactive Reporting without the need to resort the data in the software. Sorting in the Results and Table section requires the local workstation to perform the sort computation. While lexible, sorting a large dataset in the Results and Table section may cause a delay in the use of the software till the computation has completed. The Sort Now button is an effective and helpful feature that aids in the mitigation of unnecessary sorting operations by allowing the user to execute the sorting changes upon request instead of having to wait for each change individually.
Creating totals The Results and Table section provides the ability to create totals for quick analysis of the returned dataset. While other sections provide better data presentation options, the totals in the section can be effectively used to verify numeric totals and when validating and analyzing data. The Results section provides the ability to create Break totals and Grand totals. Totals are added by highlighting a data column, right-clicking, and selecting Break Total or Grand Total. Totals are also added by highlighting a data column, clicking on the Results menu, and selecting Break Total or Grand Total.
[ 102 ]
Chapter 5
Grand totals Grand totals are used to total all of the data in a particular column. When the Grand Total option is added to the section, a window appears allowing the user to select the columns to total and the data function as shown in the following screenshot:
Multiple columns may be selected in the window to total multiple columns in the same line of data. After the desired selections are made and the OK button is clicked, a row is added to the bottom of the data grid with the totals selected in bold.
Break totals Break totals produce totals broken out by a particular column in the Results and Table section. The Break total sorts the data in the section and then inserts totals after each break in the data. When Break totals are added to the section, a window appears similar to the Grand total window but includes a spot to select the Break Column.
Multiple columns can be selected to total in the listbox. Upon clicking the OK button, the data is sorted by the break column and rows are added at each break of data in the column with the name of the break total and the totals in bold. [ 103 ]
Results and Tables
Impact when adding ilters
The Grand total and Break total rows update dynamically when ilters are added, modiied, or removed from the Results or Table section.
Removing totals Both the Grand total and Break total rows are removed by highlighting the row of data with the total and pressing the Delete key, or by opening the Grand total or Break total window and selecting the Remove All button.
Grouping columns The Results and Table section provides the lexibility to group data into custom values. A grouping column is added to the section by highlighting a data column in the section, right-clicking, and selecting the Add Grouping Column menu item. Another method to add a grouping column is by highlighting the data column, clicking on the Results menu and selecting the Add Grouping Column menu item. After the menu item is selected, the Grouping Column window appears as shown in the following screenshot:
The irst textbox at the top of the window is the name for the new column, which can be edited to rename the column to a user-deined value. The button below the column name textbox called New Group is used to add a group to the Groups listbox. Once groups are added to the Groups listbox, items can be assigned to the group. Items are assigned to each group by highlighting the group name in the Groups listbox and then highlighting items in the Available Values listbox and using the left arrow to move the values into the Items in Group listbox. Items are easily removed from the Items in Group listbox by selecting the items and clicking on the right arrow to move the items out of the group. [ 104 ]
Chapter 5
The Options button at the bottom-right of the window is used to identify the option to set for columns not added to groups. Clicking on the Options button brings up a window for setting the appropriate methodology for ungrouped columns. The Null option is the default and provides no data for items not assigned to a group, the Default option is used to provide a default "catch-all" bucket for all values not assigned to a group, and the Individual Group option uses the actual column value in the Grouped column. Once the OK button is clicked in the window, the Grouping column is added to the Results section with the groups listed. If there is an interest to modify the grouping conditions, the column can be modiied by highlighting the column, right-clicking, and selecting Modify Column menu item. The column may also be removed by selecting the Remove Column menu item from either menu. Grouping columns are effective for simple groupings, but maintaining the column becomes cumbersome if the data signiicantly changes between query processing due to the manual effort needed to update the column.
Computed items While there is a signiicant ability to add and create custom columns in the Query section, the Results and Table section also contains the ability to create custom columns. Computed items are custom columns where logic is used to create new values, modify existing items, or to create calculations. The syntax used in computed items in Query section is the SQL of the database, but the syntax used in the Results and Table section leverages JavaScript to create the custom columns. To add a computed item, right-click anywhere in the Results or Table section and select the Add Computed Item menu item or click on the Add Computed Item menu item from the Results or Table menu. Once the menu item has been selected, the Computed Item window appears as shown in the following screenshot:
[ 105 ]
Results and Tables
The textbox at the top of the window is used to set the name of the computed item column in the section. The Deinition textbox is used for entering the case sensitive logic for the Computed Item, and the buttons below the Deinition text box are the different logic conditions and operators that can be used in the Deinition. The buttons to the right of the textbox are similar to the buttons in the Query section, where predeined functions can be used to transform data. The Reference button is used to select a column in the section for addition into the Computed Item, where both computed items and items from the query may be added. Finally, the Options button is used to set the Datatype of the column.
Computed item examples The same operations identiied and performed in the Query section can also be performed in other computed items. The following methods are the same operations demonstrated in SQL in Chapter 3, The Data Model but converted into the JavaScript syntax used in computed items.
Concatenation The + sign can be used to concatenate text ields. Both the single quote and double quotes can be used for text entries. Products.Prod_Name+" – "+Products.Prod_Desc
String manipulation A number of predeined string functions exist for the manipulation of strings. The Rtrim(Ltrim(Products.Prod_Desc)) is used to trim each side of the string. The Substr(Customers.Cust_Postal_Code,1,5) function is used to substring values from a string, and Upper(Customers.Cust_Last_Name) and Lower(Customers. Cust_Last_Name) are used to set the case of string to all uppercase or lowercase.
Conditional functions The NVL and Decode functions exist and perform in the same manner as the functions in Chapter 3, The Data Model. Nvl(Promotions.Promo_Name, 'No Product Name') provides the null column value replacement, and the Decode(Times. Calendar_Month_Number, '01', 'January', '02', 'February', '03', 'March', 'Other') function decodes the Calendar Month Number into the text representation
of the date.
[ 106 ]
Chapter 5
Date/time functions Many date and time functions exist to allow the data to be converted from dates to strings, strings to dates, and provide date/time manipulation. The functions are similar in operation to the functions demonstrated in the Query section, but the parameters used are based on the parameters deined by Interactive Reporting. A quick method for looking up the parameters of different number formats is to leverage the number or date formatting window by highlighting a column of data, right-clicking, and selecting the Number menu item. The menu item pulls up the different formatting options for the column, and the different parameters shown in the Format window are the parameters available for use in functions.
For instance, ToChar(DATE, 'dd-mmm') converts a date to the two-digit day with the three-character month text abbreviation.
Numeric functions A set of numeric functions also exists providing the ability to look across all of the data in the section and perform a computation or break computation on the set of data. When any of the numeric functions are used, the ilters cannot be used on the column, but using a Table section off of the section with the computation allows for the iltering of the column in the table.
Date Groups When working with date ields, multiple date formats are typically needed to satisfy the reporting requests requiring the creation of a set of columns derived from a single date ield. There are many ways to create the different date ield variations in Interactive Reporting, including Computed Items and by using the Date Group function. When Computed Items are used to create a variation of a date ield, many users typically drop the date datatype from the column in Interactive Reporting. When the column is then used later in Interactive Reporting, the column may no longer sort in date order due to the change of the column from a date format to a text format. For example, creating a Computed Item that converts dates into short month names (12 as Dec), which will sort in alphabetical order if the date datatype is dropped in the process of creating the column.
[ 107 ]
Results and Tables
Date Groups are speciic to Results and Table sections and are created by highlighting a date ield in the Results or Table section, right-clicking, and selecting Add Date Groups from the right-click menu as shown in the following screenshot:
When the Date Group option is selected, the Date Group function creates three Computed Items, including a short month name column, a four digit year column, and quarter column. Each column behaves similar to a Computed Item and can be modiied if desired. An example of the three columns created is shown in the following screenshot:
The date columns can be used later in the presentation sections of the document. The short month name column is especially helpful as this short month name column will sort in date order and not alphabetical order when it is added into a Chart, Pivot, and other sections. If there is an interest in creating a Date Group for both a calendar and iscal year, create a Computed Item in the Query or Results/ Table section that calculates the iscal year from the calendar year column and then apply a Date Group to both the calendar year and iscal year columns in the Results/Table section.
[ 108 ]
Chapter 5
Summary The goal of this chapter was to provide the business analyst with the knowledge to perform analysis in a Results and Table section on the data returned from a query. The chapter started with an overview of the Results section and covered adding, duplicating, and removing Results and Table sections from the document. The chapter addressed adding and modifying Results and Table content. The chapter addressed Filtering and the differences between Results and Table ilters and Query ilters. The chapter provided an overview of Sorting, and the chapter demonstrated the methods for adding Break totals and Grand totals. The chapter provided information on adding Grouping columns and Computed items. The chapter concluded with example Computed item logic and an explanation using the Date Group function to create variations of a date column.
[ 109 ]
Pivots Pivots are one of the most widely used tools for analyzing and presenting data. Interactive Reporting Pivots provide the business analyst with a very effective method to summarize and analyze a dataset, providing the ability to quickly modify, compute, and rearrange data while easily repopulating the dataset with new data. Pivots are very useful in presenting data, where the sections can be analyzed individually or included in Dashboards and Reports. The focus of this chapter is to demonstrate the features of the Pivot used to effectively analyze and present content. This chapter covers: • •
Creating pivots
•
Managing pivot headings
•
Analyzing content
•
Formatting and conditional formatting
•
Methods for adding content
•
Sorting
•
Totals and computed items Methods for exporting and printing
Pivots
Creating Pivot sections Pivots are added to a document by selecting the New Pivot item from the Insert Menu. When a new Pivot section is added the document, the Pivot will appear in the Section Catalogue with the default name Pivot. Renaming the section is consistent with other sections, where the section is renamed using one of the three following options: Right-click method
Edit menu method
Double-click method
Right-click the section in the Section Catalogue and select Rename Section
Select Rename Section from the Edit menu while viewing the section
Double-click the name of the section in the Section Title Bar
Change the section to the desired name and select OK
Change the section to the desired name and select OK
Change the section to the desired name and select OK
Pivot this Chart Interactive Reporting provides the ability to create a Pivot from the data contained in a Chart section. While viewing a chart, the Pivot this Chart menu option in the Insert menu can be selected. Upon selecting the menu item, a new Pivot section is added to the document and is activated in the main window. Interactive Reporting translates the axis information of the Chart to the Pivot row and column labels and the Fact elements to the Facts in the Pivot. This feature can be used with all chart types except the Scatter and Bubble charts.
Pivots created using results or tables Pivot sections can be added underneath a Results section or Table section to allow for reporting on subsets of data. When a Pivot is added to the document and a Query section, Results section, or a section reporting off of a Results section is active (displayed in the main window and highlighted in the Section Catalogue), the Pivot will be allowed access to all of the elements and will relect all of the data stored in the Results section. However, a Pivot may also be added to report off a subset of results contained in a Table section. When a Pivot is added to the document and the parent section is a Table section or presentation section with a Table section as the parent, the Pivot appears in the Section Catalogue indented underneath the Table section to denote the section is reporting off of the data contained in a table. Notice how the US Sales Pivot and US Sales Chart in the following screenshot appear indented underneath the US Sales Table. This indentation denotes that the Sales Pivot and Chart are both presenting information from the US Sales Table. Notice also how the Sales Pivot and Cost Pivot appears underneath the Results section and not indented. This shows that the Sales Pivot and the Cost Pivot present information from the Results section. [ 112 ]
Chapter 6
Removing Pivot sections Pivot sections are removed from the document using one of the two options shown in the following table: Right-click method
Edit menu method
Right-click the section in the Section Catalogue and select Delete Section
Select Delete Section from the Edit menu
Conirm section delete by selecting Delete from the Delete Section conirmation window
Conirm section delete by selecting Delete from the Delete Section conirmation window
Adding content Once a Pivot is added to the document, data from the parent Results or Table section may be added to the Pivot by adding elements to the Data Layout window in the section. The Data Layout section is displayed at the bottom of the main window and can be shown or hidden by clicking on the Data Layout button in the Section Title Bar. An example of the Data Layout window is shown in the following screenshot:
[ 113 ]
Pivots
The Data Layout window contains three different areas controlling the display of content in the Pivot named Row Labels, Column Labels, and Facts. Items are added to the different areas by the following three methods: Drag-and-drop method
Right-click method
Pivot menu method
Highlight the column(s) in the Elements window
Highlight and right-click the column(s) in the Elements window
Highlight the column(s) in the Elements Window
Left-click and drag the column(s) to the Row Labels, Column Labels, or Fact area in the Data Layout window
Select from the menu the desired location to add the column(s) to the pivot
Click on the Pivot menu and highlight the Add Select Items menu item Select from menu the desired location to add the column(s) in the pivot
Row and column labels Row labels are the items displayed on the left-hand side of the Pivot, and column labels are the items displayed on the top of the Pivot. Multiple elements may be added to both the row and column labels, where the order of the columns drives the order and summarization of the data in the Pivot.
Facts Facts are elements of data summarized by the elements added to the row and column labels. Facts are typically numeric data elements, but Interactive Reporting also allows for text columns to be added as a Fact. While numeric items are aggregated by a data function, text items are separated by commas creating a string of values.
Data functions The Pivot differentiates the aggregation of each Fact by the Data function. The default is the Sum function and can be changed to another preset coniguration. Other functions include Average, Count, Count Distinct, Maximum, Minimum, % of Column, % of Row, and % of Grand. The data function of a fact item can easily be adjusted by one of the following methods:
[ 114 ]
Chapter 6
Right-click method
Pivot menu method
Highlight the Fact column of data in the pivot
Highlight the Fact column of data in the pivot
Right-click and highlight the Data Function menu item
Open the Pivot menu and highlight the Data Function menu item
Select the Data Function of interest
Select the Data Function of interest
Removing content Items in the Row labels, Column labels, and Facts are easily removed. Use one of the following steps to remove a column from the Data Layout: Right-click method
Keyboard method
Pivot menu method
Highlight and right-click on the column(s) in the Data Layout
Highlight the column(s) in the Data Layout or the entire column in the Pivot
Highlight the column(s) in the Data Layout
Select Remove
Press the Delete key on the keyboard
Open the Pivot menu and select the Remove Selected Items menu item
Arranging label content The Pivot section provides lexibility to easily modify and rearrange content while performing analysis. The irst and most commonly used method of rearranging content is the ability to easily move row and column element in the pivot. Row and column elements are rearranged by dragging-and-dropping elements in the Data Layout, or by highlighting and moving the column of data in the physical pivot.
[ 115 ]
Pivots
A tab exists at the end of each row and column label allowing for the highlighting of the entire column as shown in the following screenshot. When the element is highlighted, the column can be pivoted from the row labels to the column labels, and the row and column labels can be rearranged respectively by dragging the element in front or behind other sections. When the element is dragged, a graphical outline appears as shown in the following screenshot:
Managing label and data headings When row and column labels are added to a Pivot section, the row and column headings are not shown by default. However, when an element is added to the Fact section, the heading of the fact is shown above every column of facts. The Pivot provides the ability to manage the headings for both the labels and facts, named Corner Labels and Data Labels.
Data labels Data labels are used to add or remove fact headings and to select the position of the fact columns in the Pivot. Three options can be selected for managing data labels including: • • •
None: The Fact records are shown as columns and no header record is included. Column: The Fact records are shown as columns and column headings are added above the fact columns. Row: The Fact records are moved to the rows and the column headings appear as row labels.
[ 116 ]
Chapter 6
The names of the Data labels can be modiied by double-clicking on the label name and entering the desired name into the pop-up window. The original name can be restored by right-clicking on the heading label and selecting Restore Name from the menu.
Corner labels Corner labels are used to manage the addition or removal of headings to the row and column elements. Four options can be selected for managing corner labels including: • • •
•
None: Removes both the row and column headings. Column: Adds headings for all column labels to the left of the column above the inal row element, where a row element must exist to display the column names. Row: Adds headings for all row elements above each column. Both: Adds headings for both row and column elements, however a row element must exist for the column headings to appear. In addition, a Data label must be selected for the inal column of row labels to appear.
The names of Corner labels may not be edited directly in the pivot. Corner label names must be renamed in the section's results.
Sorting Each row and column label can be sorted in ascending or descending order by either the name of the label or by any Fact column in the pivot, providing the lexibility to sort items in a row and column by any column in the dataset. The Sort line in the Pivot section appears different compared to the previously discussed sections due to the additional lexibility provided by the Pivot Sort line for sorting the aggregated information. The Sort line is toggled to show or hide by clicking on the Sort button at the top of the Section Title Bar. An example of the Sort line is shown in the following screenshot:
[ 117 ]
Pivots
Notice the Sort line contains three drop-down boxes. The irst is for selecting the row or column label to sort and the second is the column to use to sort the label. The default sort column is Label, which refers to sorting the data by the physical label name. The third drop-down box is for the selection of the data function to use when sorting the data. If the Label option is selected, the third drop-down box is disabled. However, if a Fact column is selected, the third drop-down box is enabled and a data function must be selected for the aggregation of data in the sort with Sum as the default. Finally, the last two buttons are used to toggle the sort in ascending or descending order.
Manual sorting Data items in the rows and columns can also be manually sorted by highlighting and dragging-and-dropping the individual data items in the Pivot to reorder the element in the row or column. The manual sort of data elements will continue to hold through data refreshes until the element is removed or sorted.
Analyzing content The analysis features of the Pivot section are the most commonly used data analysis features in Interactive Reporting. The Pivot section provides the ability to Focus, Hide, and Drill into columns of data to easily locate and explore datasets. To demonstrate each of the three analysis features, the sales and cost example from previous chapters will be used. The following screenshot shows a Pivot conigured with sales and cost across regions.
[ 118 ]
Chapter 6
Drill The concept of drilling into data has become of one of the most commonly used terms in data analysis, where drilling provides the ability to start at a high-level dataset and explore the details of a particular section of data. The Interactive Reporting Pivot concept of drilling is similar, where the software allows the ability to drill into another data element available in the parent section of data. When a Drill is initiated, Interactive Reporting freezes the data item(s) selected for the drill and removes all of the other items in the particular row or column label. Then an addition element selected during the Drill is added to the row or column label to show the additional detail. One of the following two steps can be used to drill into a Pivot of data: Right-click method
Pivot menu method
Highlight the item(s) in a row or column label and right-click
Highlight the item(s) in a row or column label
Highlight Drill Anywhere
Open the Pivot menu and highlight Drill Anywhere
Select the element to drill into
Select the element to drill into
Using the previous sales model example, the outcome of drilling into the Americas region to the Country Name element is shown in the following screenshot. Notice how the other previously shown regions are now hidden from view and the additional data element (Country Name) has been added as a row label to the data layout. Notice also the drill bit icon next to the Country Region row label denoting the Country Region column is focused on a particular set of items.
Multiple drills can take place in a Pivot, and items in the Pivot may be rearranged as desired. [ 119 ]
Pivots
Drillup Interactive Reporting provides a very simple way of reversing the Drill behavior. The following steps are used to Drillup on a column of data. Right-click method
Pivot menu method
Click on the tab at the bottom of the element that was selected from the Drill Anywhere menu
Click on the tab at the bottom of the element that was selected from the Drill Anywhere menu
Right-click and select Drillup
Open the Pivot menu and select the Drillup menu item
In continuing with the previous example, selecting Drillup on the Country Name ield in the pivot will return the pivot to the original example starting point.
Focus and hide The Focus and Hide functionality also exists to allow for the analysis of particular items without drilling into another element of data. The Focus and Hide functionality compliment the Drill functionality and can be used while drilling and performing analysis.
Focus The Focus feature of the pivot provides the ability to highlight and keep speciic data items in a row or column label. When the Focus feature is applied, only the items selected will remain in the label. The Focus feature can be executed through one of the following methods. Right-click method
Pivot menu method
Highlight and right-click the item(s) in the row or column label
Highlight and right-click the item(s) in the row or column label
Select Focus on Items
Open the Pivot menu and select the Focus on Items menu item
Hide The Hide feature of the Pivot provides the ability to remove items from the Pivot. Any item selected will be removed from the Row or Column label when the Hide feature is applied. The Hide feature can be executed through one of the following methods:
[ 120 ]
Chapter 6
Right-click method
Pivot menu method
Highlight and right-click the item(s) in the row or column label
Highlight and right-click the item(s) in the row or column label
Select Hide Items
Open the Pivot menu and select the Hide Items menu item
Hidden item The Hidden item feature of the pivot is used to hide a Fact column from view in the pivot display. Hidden items are commonly used in Pivots when performing computed items and sorts, where the item can be used in the sort or calculation but can be hidden from view. The following steps are used to hide a fact item in the pivot: Right-click method
Pivot menu method
Highlight the Fact column(s) in the pivot or element(s) in the Data Layout Facts section
Highlight the fact column(s) in the pivot or element(s) in the Data Layout Facts section
Right-click and select Hide Items in the pivot or Hidden Items in the Data Layout
Open the Pivot menu and select the Hide Items menu item
When a fact item is hidden, the column appears grayed out in the data layout, but the element will appear in the sort and computed item menus.
Unhide Two methods exist for reversing the Focus, Hide, and Hidden Item options. The Show All Items method is used to unhide all items in the pivot that have been hidden, and the Show Hidden Item function is used to unhide items of a particular element. The Show All Items function is executed by highlighting any element in the pivot and selecting Show All Items from the Pivot menu or Right-Click menu, and the Show Hidden Items function is executed by highlighting the columns to unhide and selecting Show Hidden Items from the Pivot menu or Right-Click menu. The unhide methods will unhide the data elements that were Drilled on, but it will not perform a Drillup on the column drilled into. Any data elements that were hidden when using the drill function will be shown if an unhide feature is used on the column.
[ 121 ]
Pivots
Totals and computed items The Pivot section provides the ability to add Totals and Computed Items to perform computations directly in the pivot. Pivots provide a very easy method of adding computations at any breakout of data. The following example shows a Pivot conigured with sales by product category and region across iscal years:
Totals Totals can be added at any level of detail across the Row or Column labels to perform break and grand totals on a dataset. Totals are easily added to a pivot by following these two methods:
[ 122 ]
Chapter 6
Right-click method
Pivot menu method
Highlight the Row or Label column in the Pivot
Highlight the Row or Label column in the Pivot
Right-click and select Add Totals
Open the Pivot menu and select the Add Totals menu item
Continuing with the sales example, adding totals to the Country Region, Prod Category, and Fiscal Year columns adds three sets of total columns to the pivot as shown in the following screenshot:
[ 123 ]
Pivots
The totals were formatted with a gray background to denote the highlighted columns in the picture. Adding Totals to the Prod Category and Fiscal Year columns adds one Total column to the end of each label element. However, notice the multiple total rows created when a Total is added to the Country Region column. A total row is added for each grouping of the Prod Category data element. Notice also the Totals from the Row labels and Column labels add together to create a grand total across the entire dataset. The Total columns are dynamic and updated based on Drilling, Focusing, Hiding, and Filtering of data in the parent dataset.
Data functions for totals The default Data function in a Total column is the Sum function. Multiple Total columns can be added to perform more than one Data function on the same row or column, where the default Data function can be changed to one of the other preset functions by following one of these two steps: Right-click method
Pivot menu method
Highlight the Total row or column by holding the ALT key and clicking on the Total ield to change.
Highlight the Total row or column by holding the ALT key and clicking on the total ield to change.
The entire Total row or column will appear highlighted. Right-click and highlight the Data Function menu item.
Open the Pivot menu and highlight the Data Function menu item.
Select the alternate data function of interest.
Select the alternate data function of interest.
Adding an additional total line to the Country Region row label in the previous example and switching the data function to the Average function shows two Total lines with different calculations as shown in the following screenshot:
[ 124 ]
Chapter 6
Notice the name of the row switches from the label Total to Average. Interactive Reporting provides default names to denote the data functions set on the particular total label, but the label can be changed and renamed by double–clicking on the label name and renaming.
Removing totals Totals lines can easily be removed by highlighting the Total label and clicking on the Delete key or clicking on the Remove Selected Items menu item in the Pivot menu.
Renaming items in row or column label Any of the items in the row or column labels can be masked with another name in the pivot by double-clicking the label and renaming. Using this renaming approach will mask the item only in the speciic pivot and may complicate the ability to trace the data throughout the document.
[ 125 ]
Pivots
A best practice when publishing documents for others is to map the name changes in the Query, Results, or Table section by using computed items, allowing traceability of the data items throughout the document.
The original item name can be restored by clicking on the Restore Name menu item from the Right-Click or Pivot menu when the label item is highlighted.
Grouping Pivot items can be grouped together by highlighting multiple items in one row or column label and selecting the Group Items menu item from the Pivot menu or by clicking on the Paper Clip button on the toolbar. Grouping the columns adds an asterisk in front of the name of the grouped column. Grouping column items can be renamed to a custom name similar to renaming a total or other item. However, the Restore Name menu item is not available for use with a grouped column. The column must be ungrouped to show the original column names.
Computed items Leveraging computed items is a common operation performed in the Pivot, where calculations can easily be performed on aggregated sets of data. While computations can be completed in the Results section, it is easier to compute percentages and other division calculations in the Pivot than the Results or Table sections. Computed items are added by the following steps: Right-click method
Pivot menu method
Right-click on the main pivot window
Select Add Computed Item from the Pivot menu
Select Add Computed Item
The syntax for a computed item is the same as found in the Results and Table sections, and the computed item is highlighted in italics in the facts section of the data layout. In the following example, a computed item has been created to show sales over quantity sold.
[ 126 ]
Chapter 6
Notice the computation of the values in the Total lines. Currently the Total lines show the sum of the values displayed in the pivot and not the division of the Total sales total columns by the quantity sold total columns.
True totals and surface values The Pivot section provides the lexibility of calculating the computed items and total lines of the document by either the computation of the values shown on the screen or by the values contained in the data results. The settings can be easily conigured in the Pivot Options menu, where the Use Surface Values or True Computed Item Totals options checkboxes can be toggled. When the True Computed Item Totals option is selected, the pivot total lines will be calculated by totaling the individual values of the columns that make up the total instead of performing the computation operation on the total column. When the Surface Values option is selected, the pivot calculates the computed item from values displayed on the pivot instead of the values in the parent Results or Table section for all columns. The Surface Values setting is necessary when adding one or more computed items together in the pivot where the values in the pivot are to be used in the calculation.
[ 127 ]
Pivots
Formatting and conditional formatting Each Pivot can be formatted using the Format menu, Format toolbar, or formatting options contained in the right-click menu. Font colors, font styles, borders, backgrounds, number formats, and text justiication can be set and conigured to produce the desired formatting of the Pivot. To format item(s) in the Pivot, highlight and right-click on the item(s) of interest and use the desired formatting options.
Conditional formatting Conditional formatting is used to apply formatting to a particular data column based on a condition. The conditional formatting feature is a new feature to Interactive Reporting and replaces the previous Spotlighter functionality. Conditional formatting is commonly used to draw attention to numerical values in the Fact columns of Pivots but the feature can also be used on Row or Column labels. To apply conditional formatting to a Pivot, select the Conditional Formatting menu item from the Format menu. The Conditional Formatting window in the following example will appear for entering the custom conditions.
[ 128 ]
Chapter 6
The irst drop-down on the window is for toggling to the data element to format. Once the column is selected, each condition can be added by irst selecting the operator to use and then supplying the value for the condition. The inal step is to conigure the formatting to apply to the data elements that it the condition conigured. If all three expressions are used, an Add Expressions button will appear under the third expression to allow for additional conditions. Conditional formatting allows for the adjustment of the text type, color, and cell background color. Throughout the process of adjusting the conditions, the Apply button can be used to preview the formatting in the Pivot selected. In the previous example, conditional formatting is applied to the Sales Pivot to highlight cells greater than 10 million with red, bold, and italic text. When applied, the Pivot above relects the desired formatting as shown. The full set of Operators provides lexibility to combine multiple formatting options, and the Between operator is commonly used for formatting a set range of values.
Exporting and printing Pivots can be exported to many formats, but there are two formats that are most commonly used by analysts. Typically analysts want to export the data to Microsoft Excel for additional analysis or inal formatting. To export a Pivot, access the File menu | Export | Section. The Export Section window appears with the ability to name the ile and select the type of the ile to create. The two main formats for exporting a Pivot to Excel are the .xls format or the .mhtml format. The .xls format creates an Excel document without the Pivot formatting applied. However, saving the Pivot in the .mhtml format and opening the document using Microsoft Excel will display the fully formatted Pivot table with the ability to continue to edit the ile. The ile can also be easily saved to the most recent Excel format using Excel without needing additional steps to convert the ile. Pivots are printed by selecting the Print menu option from the File menu. While a pivot can be printed directly from the section, analysts commonly leverage the Report section to provide a better interface for formatting and printing Pivots. The Report section, addressed in the Report chapter of the book, demonstrates the methods for adding Pivots and building well formatted reports.
[ 129 ]
Pivots
Summary The focus of this chapter was to provide the business analyst the features necessary to effectively analyze and present content in a Pivot section. The chapter started with the methods for creating and adding content to a Pivot and continued with an overview to managing Pivot headings and labels. The chapter addressed the methods for sorting a Pivot using the text labels and Fact elements. The chapter explored the data analysis capabilities of the tool and the concept of drilling, focusing, and hiding to analyze content. The chapter provided steps used to add totals and computed items providing additional data manipulation and calculations. The chapter continued with an overview of the different formatting options including Conditional Formatting, and the chapter concluded with methods for effectively printing and exporting a Pivot for further analysis.
[ 130 ]
Charts Chart sections provide the business analyst the ability to graphically model data in a variety of different Chart formats. Charts are populated with data from a single dataset and can be worked with individually or included in Reports and Dashboards. Similar to Pivots, the Chart section allows for user interaction and analysis directly in the section, including Focusing, Hiding, and Drilling. The focus of this chapter is to demonstrate the key features of the Chart section, including creating and coniguring Charts, analyzing Chart content, and methods for exporting and printing. This chapter covers: • •
Creating charts and charting pivots
•
An overview of each Chart type
•
Sorting Chart content
•
Methods for adding content
•
Analyzing content
•
Grouping Chart content Methods for exporting and printing
Charts
Creating Chart sections Charts are added to a document through selecting the New Chart item from the Insert menu. When a new Chart section is added to the Interactive Reporting document, the chart appears in the Section Catalogue with the default name Chart. Renaming the section is consistent with other sections, where the section can be renamed through one of the following three options: Right-click method
Edit menu method
Double-click method
Right-click on the section in the Section Catalogue
Select Rename Section from the Edit menu while viewing the section
Double-click the name of the section in the Section Title Bar
Select Rename Section
Change section to desired name and select OK
Change section to desired name and select OK
Change section to desired name and select OK
Charts created using results or tables Similar to Pivot sections, charts can be added under Table sections or Results sections, allowing charts to be built from the full set of results or off of a subset stored in a Table. To insert a Chart section under a Table section, the Table section or sections underneath the Table section must be active in the Section Catalogue. To insert a chart under the Results section, the Results section or a section directly underneath the Results section must be active. Charts added underneath Table sections are indented in the Section Catalogue to denote the relationship of the chart to table.
Chart this pivot Charts can also be created directly from a Pivot section by selecting the Chart This Pivot option from the Insert menu when inside the pivot section of interest. The chart will appear in the default bar format with the Row Labels set to the X-Axis, the Column Labels set to the Depth and the Fact items set as the Fact (Stack).
Removing Chart sections Chart sections are removed from the document by following one of the two options shown in the following table:
[ 132 ]
Chapter 7
Right-click method
Edit menu method
Right-click on the section in the Section Catalogue
Select Delete Section from the Edit Menu
Select Delete Section
Conirm section delete by selecting Delete from the Delete Section conirmation window
Conirm section delete by selecting Delete from the Delete Section conirmation window
Adding content Content is added to a Chart by adding elements from the Elements window into the Data Layout window. The Data Layout section is displayed at the bottom of the main window, and the window can be shown or hidden by clicking on the Data Layout button in the Section Title Bar. An example of the Data Layout window for the Vertical Bar chart is shown in the following screenshot:
Different chart types contain different options in the Data Layout. Elements are added to the different areas by the following three methods: Drag-and-drop Method
Right-click method
Chart menu method
Highlight the column(s) in the Elements window
Highlight and right-click on the column(s) in the Elements window
Highlight the column(s) in the Elements Window
Left-click and drag the column to the Row Labels, Column Labels, or Fact area in the Data Layout window
Select from the menu the desired location to add the column in the chart
Click on the Chart Menu and highlight the Add Select Items menu item Select from the menu the desired location to add the column in the chart
[ 133 ]
Charts
Removing content Items in the Data Layout are easily removed. Use one of the following steps to remove a column from the Data Layout: Right-click method
Keyboard method
Chart menu method
Highlight and right-click on the column(s) in the Data Layout
Highlight the column(s) in the Data Layout or the entire data item in the chart
Highlight the column(s) in the Data Layout
Select Remove
Press the Delete key on the keyboard
Open the Chart Menu and select the Remove Selected Items menu item
Chart types When a new chart is added, the default chart type is the Vertical Bar chart. The chart type can be changed at any time to one of the following chart types: Horizontal Bar, Vertical Stack Bar, Horizontal Stack Bar, Vertical Cluster Bar, Pie, Stacked Area, Area, Line, Ribbon, Bar-Line, Scatter, and Bubble. The chart type can be changed by one of the two steps shown as follows: Format menu method
Section toolbar
Highlight Chart Type from the Format menu
Click on the down arrow next to the chart image in the Section Toolbar
Select the chart type of interest
Select the chart type of interest
Vertical and horizontal bar charts The Vertical Bar chart displays data in bar format as shown in the following screenshot:
[ 134 ]
Chapter 7
The Horizontal Bar chart displays data in bar format as shown in the following screenshot:
[ 135 ]
Charts
The Data Layout window contains three different areas for adding content. The Fact (Stack) area is used to add the fact or numerical data to the chart. The X-Axis is used for breaking out the fact along the x-axis of the chart, and the Depth is used for breaking the fact data across the z-axis. Multiple data elements can be added to any section. As additional elements are added to the Fact (Stack), the elements stack in the order shown in the Data Layout. The following image demonstrates stacking elements in the fact section, where individual iscal year sales columns are added and stacked in the Chart. In Vertical Bar-Stacked chart:
[ 136 ]
Chapter 7
In Horizontal Bar-Stacked chart:
Notice in the previous charts that the stacked facts are separated in each bar. By default, the legend is set to the X-axis as shown in the irst image of this section. However in the previous charts, the legend has been switched from the x-axis to the fact to show different colors for each stacked item. Methods for changing the legend are detailed later in this chapter.
[ 137 ]
Charts
Vertical and horizontal stack bar charts The Vertical Stack Bar and Horizontal Stack Bar chart models data in a similar format to the standard bar charts. The following is an example of a Vertical Stack Bar chart:
The following is an example of a Horizontal Stack Bar chart:
[ 138 ]
Chapter 7
The Data Layout window for this chart type contains the X-Axis, Stack, and Fact (Depth) areas for adding content. The difference between the stack bar and standard bar chart is the position of the Stack and Depth options in the Data Layout window. In the stack bar charts, the Data Layout window contains a Stack area instead of a Depth area for adding elements, which is used to split the data in the bar by items in a column. While standard bar charts require each stack to be a separate fact data element, the Stack area accepts a non-fact element. The charts above use a Fiscal Year column in the Stack area of the Data Layout, breaking the data out into four stacks (one for each distinct iscal year). As data is refreshed and updated, the chart will stack dynamically by the number of distinct iscal years in the data results. When adding fact items to the Fact (Depth) area, additional facts are displayed across the z-axis of the chart. The X-Axis Data Layout is similar to the standard bar charts and is used to split out the fact data across the x-axis by the distinct items in a column. The default legend setting in this chart must also be changed to the Stack from the default X-Axis to show the stack breakout in the legend as shown in the previous screenshot.
[ 139 ]
Charts
Vertical cluster bar chart The Vertical Cluster Bar chart is very similar to the standard bar chart, but displays multiple bar lines for each fact item as shown in the following screenshot:
In the vertical cluster bar chart, the Data Layout contains X-Axis, Depth and Fact (Cluster) areas for adding data elements. The X-Axis and Depth perform in the same manner as the other bar charts, but the Fact (Cluster) area adds a bar for each fact item. The previous chart is the same example as the standard vertical bar chart but switched to the vertical cluster bar format. Each iscal year fact column added to the chart displays an additional bar for that iscal year split out across the x-axis items.
Pie charts The Pie chart graphs data in pie format as shown in the following screenshot:
[ 140 ]
Chapter 7
The Data Layout of the Pie chart contains only the Fact and Slice areas. The Fact area is used for adding the numerical fact data, and the Slice area is used to split out the fact data across the pie. Multiple elements may be added to the Slice area, grouping the items displayed.
[ 141 ]
Charts
Area and stacked area charts Area charts are similar to bar charts and display data continuously between data points. The following is an example of an Area chart:
The following is an example of a Stacked Area chart:
[ 142 ]
Chapter 7
The Area chart Data Layout is similar to the standard bar chart, where it contains the X-Axis, Depth, and Fact (Stack) areas for adding content. The Stacked Area chart is similar to the Stacked bar chart, where the Data Layout contains the X-Axis, Stack, and Fact (Depth) areas for adding content.
Line charts The Line chart displays data as points connected by lines as shown in the following screenshot:
[ 143 ]
Charts
The default Data Layout coniguration options for the Line chart shows the X-Axis, Depth, and Fact (Stack) areas. When a Stacked bar or Area chart is switched to a line chart, the Data Layout for the Line chart displays a Stack area and a Fact (Depth) area as shown in the following screenshot:
Both conigurations provide the lexibility to operate the Line chart as a standard Line chart or a stacked Line chart.
Ribbon charts Ribbon charts shows data similar to Area charts, but only a thin line of data is displayed compared to the entire area as shown in the following screenshot:
[ 144 ]
Chapter 7
The Ribbon chart is similar to the standard Line chart, where the Data Layout contains the X-Axis, Depth, and Fact (Stack) areas.
[ 145 ]
Charts
Bar-Line charts The Bar-Line chart provides the ability to graph both bars and lines on a single chart as shown in the following screenshot:
The Data Layout coniguration is similar to a standard bar chart, but the Fact (Stack) area is replaced by a Fact area. When elements are added to the Fact section, each element is conigured to alternate between a bar and line. Previous versions of the software required the alternation of each of these items, but newer versions allow for the toggling of the bar and line by right-clicking on the element in the Data Layout Fact section and selecting Display as Bar or Display as Line. The bar facts are in the stacked format by default, but editing the Stack/Cluster settings on the Bar Chart tab of the Chart Properties will allow the toggling of the bars between the Stack and Cluster formats. Notice the scale on the right of the chart and the underline of the line elements in the Data Layout Fact area. Any fact element with an underline is set to use the scale on the right of the chart, and any fact element without an underline is set to using the scale on the left of the chart. Double-clicking the fact item in the Data Layout toggles the scale used. If the left or right scale is not used, the scale will be hidden from view. [ 146 ]
Chapter 7
Scatter / Bubble charts Scatter and Bubble charts are different from the previously discussed charts because these charts display relationships between fact elements. The following screenshot shows an example of Scatter chart:
[ 147 ]
Charts
The following screenshot shows an example of Bubble chart:
The Data Layout of the Scatter and Bubble chart both contain an X-Axis and Y-Axis area, and the Bubble chart contains an additional Size Facts area. The Scatter chart's previous example shows the quantity of products sold on the y-axis and the cost of those products across the x-axis. The Bubble chart shows the same elements across a smaller dataset, where the Size Fact area is used to view an additional dimension of fact data in the graph.
Legend The Legend is used to provide information about elements in one of the Data Layout areas. The Legend can be shown or hidden, and provides a set of formatting options. The easiest method for modifying the Legend is left-clicking on the Legend in the chart to highlight the section and then right-click to bring up the Legend options. The Legend options include Auto-Size, Hide Legend, Wrap Legend Text, Show Legend Outline, and Set Legend On. The Set Legend On property is used to set the Legend to one of the Data Layout sections. The following options provide different options for setting the Legend: [ 148 ]
Chapter 7
Right-click method
Format menu method
Section toolbar
Highlight the legend in the chart and right-click
Open the Format Menu and select the Set Legend On menu item
Click on the down arrow of the middle button in the Section toolbar
Highlight over the Set Legend On menu item and select one of the Data Layout options
Select one of the Data Layout options from the Set Legend On window
Select one of the axis options
The typical Legend options do not apply for the Scatter and Bubble charts, where the only Legend options shown are formatting, showing and hiding.
Data functions The Chart section provides the ability to change the datatype used to aggregate the fact items in the section. The default is set to Sum and can be changed to another coniguration. Other functions include Average, Count, Count Distinct, Maximum, Minimum, and Percent of Grand. The data function of a fact item can easily be adjusted by one of the following methods: Right-click method
Chart menu method
Highlight the fact item to modify in the Chart or Data Layout.
Highlight the fact item to modify in the Chart or Data Layout.
Right-click and highlight the Data Function menu item.
Open the Chart menu and highlight the Data Function menu item.
Select the Data Function of interest.
Select the Data Function of interest.
Analyzing content The Chart section also provides analysis tools similar to the Pivot section, where the Chart is interactive and can be manipulated during analysis. The Chart section provides the ability to Focus, Hide, and Drill into the non-fact data elements to explore datasets. Scatter and Bubble charts do not allow the use of any of the features of this section except the Hidden Item feature. [ 149 ]
Charts
Drill The non-fact items in the chart can be drilled into similar to drilling into a Pivot. Use one of the following two steps to drill into a Chart: Right-click method
Chart menu method
Highlight the label of the element(s) in the chart (x-axis or z-axis)
Highlight the element(s) in a row or column label
Right-click and highlight Drill Anywhere
Open the Pivot menu and highlight Drill Anywhere
Select the element to drill into
Select the element to drill into
Drillup The following steps are used to reverse the Drill behavior and Drillup on chart elements: Right-click method
Chart menu method
Highlight the name of the data element in the chart or the element in the Data Layout
Highlight the name of the data element in the chart or the element in the Data Layout
Right-click and select Drillup
Open the Chart menu and select the Drillup menu item
Focus The Focus feature of the Chart section provides the ability to highlight and keep speciic data items in a non-fact section. When the Focus feature is applied, only the items selected will remain. The Focus feature is executed through one of the following methods: Right-click method
Chart menu method
Highlight the name of the data element or graphical item in the chart
Highlight the name of the data element or graphical item in the chart
Right-click and select Focus on Items
Open the Chart menu and select the Focus on Items menu item
Hide The Hide feature of the Chart section provides the ability to remove data items from the chart. Any item selected will be removed from the view when the Hide feature is applied. The Hide feature can be executed through one of the following methods: [ 150 ]
Chapter 7
Right-click method
Chart menu method
Highlight the name of the data element or graphical item in the chart
Highlight the name of the data element or graphical item in the chart
Right-click and select Hide Items
Open the Chart menu and select the Hide Items menu item
Hidden Item The Hidden Item feature of the chart is used to hide a fact column from view in the chart display. Hidden items are commonly used in charts when performing computed items and sorts, where the item can be used in the sort or calculation but can be hidden from view. The following steps are used to hide a fact item in the chart: Right-click method
Chart menu method
Highlight the name of the data element or graphical item in the chart
Highlight the name of the data element or graphical item in the chart
Right-click and select Hide Items in the chart and Hidden Items for in the Data Layout
Open the Chart menu and select the Hide Items menu item
When a fact item is hidden, the column appears grayed out in the Data Layout but is still available for use in the sort and computed item menus.
Unhide Two methods exist for reversing the Focus, Hide, and Hidden Item options. The Show All Items function is used to unhide all items in the chart that have been hidden, and the Show Hidden Item function is used to unhide a selected item(s). The Show All Items method is executed by highlighting any element in the chart and selecting Show All Items from the Chart menu or Right-Click menu, and the Show Hidden Items function is executed by highlighting the columns to unhide and selecting Show Hidden Items from the Chart menu or Right-Click menu. The unhide methods will unhide the data elements that were Drilled on, but it will not perform a Drillup on the column drilled into. Any data elements that were hidden when using the drill operation will be shown if an unhide feature is used on an element.
[ 151 ]
Charts
Adding reference and trend lines Charts provide the ability to add Reference Lines or Trend Lines for every fact item and depth in a chart. Trend lines show the trend of the fact item and Reference lines show data based on the Average, Minimum, or Maximum of the fact item. Either item can be added by one of the following methods: Right-click method
Chart menu method
Highlight the fact item to modify in the Chart or Data Layout
Highlight the fact item to modify in the Chart or Data Layout
Right-click and select Add Trend Line or Add Reference Line
Open the Chart menu and select Add Trend Line or Add Reference Line
Sorting Chart labels Non-fact items can be sorted in the Chart section by leveraging the same sorting options and techniques used with Pivots. The Sort line is toggled on and off by clicking on the Sort button at the top of the Section Title Bar. An example of the Sort line is shown in the following screenshot:
The Sort line contains three drop-down boxes. The irst is for selecting the non-fact item to sort and the second is the column to use to sort the label. The default sort column is Label, which refers to sorting the data by the physical label name. The third drop-down box is for the selection of the data function to use when sorting the labels by a fact column. If the Label option is selected, the third drop-by-box is disabled. However, when a fact column is selected, the third drop-down box is enabled and a data function must be selected for the aggregation of data in the sort with Sum set as the default.
Chart formatting and properties The Chart section provides many options for modifying the display and format of a chart. If an item in the chart can be highlighted, it can be formatted. Formatting options include changing chart colors, font sizes, number formats, borders, headings, sizing, positioning, labels, and much more. Some of the formatting options can be set on the Right-Click menu and others can be achieved using the Format menu or Format Toolbar.
[ 152 ]
Chapter 7
Chart properties Many types of property windows exist in the Chart section. These property windows are accessed by highlighting the area of the chart and selecting the Properties menu item is selected from the Chart menu or Right-Click menu. The following is an example of the default Chart Properties window.
Notice the multiple tabs on the properties window. Each tab contains different settings for modifying the chart coniguration, display, axis, and labels. The formatting items can be toggled as desired throughout the design and modiication of the chart.
Inserting text labels Custom text labels can be placed in the report by right-clicking on the Chart and selecting the Insert Text Label menu item. Once the text label has been created in the chart, the label can be formatted using the Format menu or Format Toolbar.
Grouping and computed items The Chart section contains the ability to add Groups or Computed Items to perform computations directly in the chart. Charts, similar to Pivots, provide a very easy method of adding computations and groupings in the section.
[ 153 ]
Charts
Grouping Chart items can be grouped together by highlighting multiple items in the chart and selecting the Group Items menu item from the Chart menu. Grouping Chart items adds an asterisk in front of the name of the item in which the items were grouped. Grouping column items can be renamed to a custom name similar to renaming a total or other item. The column must be ungrouped to show the original column names.
Computed items Computed items can be leveraged in a chart, where calculations are easily conigured. Computed items are added by one of the following methods: Right-click method
Chart menu method
Right-click in the main Chart window
Select Add Computed Item from the Chart Menu
Select Add Computed Item
The syntax for the computed item is the same as found in the Results and Table sections, and the computed item is highlighted in italics in the facts section of the Data Layout. Computed items cannot be used in the Scatter or Bubble charts.
Exporting charts Charts can be exported to many formats, where the chart exports as an image, data, or both an image and data. Charts are exported by accessing the File Menu | Export | Section. The Export Section window appears with the ability to name the ile and select the type of the ile to create. The two common formats for exporting charts are the .jpg or the .mhtml format. The .jpg format creates and image of the chart and the .mhtml format creates a Microsoft Ofice HTML document. When the .mhtml document is opened in Excel, the data from the chart displays in a pivot on the irst tab of the ile and the chart image displays on a second tab. Exporting the ile in Microsoft Excel format will only display the data from the chart in Microsoft Excel format and not the chart image. Other less common chart export options include HTML and PDF. [ 154 ]
Chapter 7
Summary The focus of the chapter was to demonstrate the key features of the Chart section, including creating and coniguring charts, analyzing Chart content, and methods for exporting and printing. The chapter started with the methods to create a new chart or create a chart from an existing Pivot section. The chapter provides an overview of each chart type in the document and provides information on the different Data Layout areas. The chapter continues on the steps used to analyze content inside the document and adding groups and computed items. The chapter concluded with the best methods for exporting the section.
[ 155 ]
Reports Reports provide the business analyst with the ability to combine multiple metrics from a set of reporting objects and data in the document into a single view. Reports are used to display content in a printable format, where Pivots, Charts, Report tables, and Report speciic objects can be added to the section to display content. Reports are commonly used to create printable or PDF documents, but the section can also be used to analyze content or generate images to be used in presentations. The focus of this chapter is to provide the business analyst with the knowledge to create and conigure a report as well as analyze content and integrate data across datasets. The Report section provides features not common to other sections, including the ability to slice the data using the Report Group feature that creates a split of data and objects displayed in a report by ields in a Table. The Report also provides the lexibility to combine data from different queries and perform calculations combining the multiple datasets. With the added functionality and ability to combine sections and data together, reports effectively assist analysts in preparing formatted deliverables while reducing workload. This chapter covers: • •
An overview of the Report layout
•
Creating Report tables
•
Editing expressions
•
Methods for adding content
•
Creating Report groups
•
Combining content from multiple queries Methods for exporting and printing
Reports
Creating Report sections Reports are added to the document by selecting the New Report item from the Insert menu. When a new report is added, the Report appears at the top of the document separate from the queries and other Reporting sections to denote that the section is query-independent, where content can be added to the report from multiple queries. The default name of the section is Report, and renaming and removing the section is consistent with the methods of renaming and removing other sections in the document.
An overview of the Report layout Understanding the layout of the Report is important for effectively adding content and taking full advantage of the features of the section. Each report contains areas where content can be dragged-and-dropped from the Elements window into the section. While these sections are by default not visible, the Section Boundaries can be turned on to show the borders of each section by accessing the Report menu and selecting the Section Boundaries menu item. The following is an example of a default report coniguration with the Section Boundaries toggled to the ON position:
Notice the default coniguration of a new report contains a Body section with a three column table inserted in the upper-left hand corner of the section. In addition to the Body boundary, Headers, Footers, and Report groups (discussed later in the chapter) may be added to the Report driving additional areas where content can be inserted and conigured.
Headers and Footers Two types of Headers and Footers can be added to the Report. A Report Header is displayed only once on a report and can be used to add introductory content to the section. A Report Footer exists one time at the end of the report and can be used to add inal content to the document. Page Headers are displayed at the top of each page and Page Footers are displayed at the bottom of each page. Both the Page Headers and Footers exist on the irst page, and can be used to display page-speciic content including run dates, page numbers, titles, and other key information. [ 158 ]
Chapter 8
Both sets of Headers and Footers can be toggled on by selecting the item name or the Show Both option under the Headers and Footers section of the Report menu. The following is an example of a report with both sets of Headers and Footers displayed:
Report setup Notice the page size and layout of the report mimics the default paper size and orientation of the page setup for printing. The page size and layout can be modiied through accessing the File menu and clicking on the Page Setup menu item, where a window appears for the modiication of the paper size and orientation as well as the printer options. The page size and layout can also be conigured to use custom settings by accessing the Report menu and selecting the Report Setup menu item, where a Report Setup window appears with the irst tab for coniguring the page size of the report. In addition to page size options, the margins and number of columns in the document can also be modiied by using the settings on the Margins and Columns tab of the window. While the page size can be modiied through the Report Setup options, using the page setup options drive the printing and exporting dimensions. Overriding the page setup options may cause content to be lost during printing or exporting.
[ 159 ]
Reports
Design guides In addition to the Section boundaries, the following design options can be toggled on or off by selecting the items from the Report menu: •
•
•
•
Design guidelines: Horizontal and vertical lines used to align content in the section Grid: Applies a grid to the report used to align content in the section Rulers: Displays rulers at the top and left of the main window Page margins: Horizontal and vertical lines used to frame the outer borders of the document
The Page margins and Section boundaries can be moved in a report by highlighting the mouse over the boundary line in the report until the mouse pointer turns into a two-sided arrow object. Once the arrow object has appeared, the section can be moved in the direction of the arrows, by left-clicking and dragging it to the position of interest.
Adding content Adding content to a report is more complex than adding content to a pivot or chart due to the lexibility to add content from any query in the document as well as other resources, graphics, and predeined objects.
Elements window While operating in the Report section, the Elements window displays the available content that may be added from the document to the report. While the Elements window in prior sections only displays ield names from a Query or Results section, the Elements window displays content in four main groups, as discussed in the following sections.
[ 160 ]
Chapter 8
Query elements Each Query section is shown at the top of the Elements window ordered according to its section name. Upon expanding the main query element, the element displays each Results, Table, Pivot, and Chart object belonging to the query. The Pivot and Chart elements cannot be broken down further, but the Results and Table elements can be expanded to display all of the ields from each section.
Graphics Graphics are objects used to graphically enhance the Report section. These objects include Lines, Rectangles, Ovals, Text labels, and Pictures. Graphics are drawn and formatted in the document to enhance content. The most common graphic is the Text label, which is used throughout the section including headers and footers.
Fields Fields are similar to text labels, but Fields are dynamic and are driven by Expressions. Fields are commonly used throughout a Report, especially in the section headers and footers. Interactive Reporting provides a number of prebuilt Fields for reporting ilters, page numbers, ile properties, and date/time, as well as a default element for creating a custom Field deinition. The expression for each Field element can be modiied to include additional logic, formatting, and content. Methods for editing expressions are discussed in the Expression section of this chapter.
Resources Resources are pictures that have been added either to the document or directly to the Resource Manager. As pictures are added to Interactive Reporting sections, the pictures are added to the Resource Manager allowing for the central management of all images. Managing pictures in the Resource Manager is discussed in the Resource Manager section in this chapter.
Adding pivots and charts The most common content added to a report is a Pivot or Chart created from data in one of the queries in the document. Pivots and charts are added to a report by dragging-and-dropping the section elements from the Elements window into the Report. Users can add multiple objects into the report window, and the objects can be resized and arranged to produce a desired product. While pivots and charts cannot be modiied or analyzed from the Report section, the Report does provide the ability to split out the data in the objects by leveraging the Report Group functionality (described later in the chapter). [ 161 ]
Reports
In addition to building a formatted report, pivots and charts are commonly added to a report to allow formatting of the section for printing. Attempting to print either object's directly from the object's section is possible, but using reports makes formatting and adding section labels, headers, and footers much easier.
Adding a table While the lexibility to add a Results or Table section to the report does not exist, the report provides the ability to create a Table inside a report with ields from any of the Results or Tables in the document. When a new report is created, the default report contains a blank Table located in the Body of the section. Tables can be added to the document by the following methods: Report menu method
Right-click method
Click the Report menu and select Insert Table.
Right-click anywhere in the report and select Insert Table.
The mouse cursor changes shape to a plus sign. Click on a location inside the Report section to add the table.
The mouse cursor changes shape to a plus sign. Click on a location inside the report section to add the table.
Once a table has been added to the report, the object can be populated with data. Further analysis of Report tables is provided in the Report Table section of this chapter.
Adding graphics, ields, and resources Graphics, Fields, and Resources are added to a document by using the Elements window or the Report menu. These objects can be added by dragging-and-dropping the object from the Elements window into the report, where the object can be formatted in the document. The Report menu provides similar functionality but also provides the ability to draw the size of the object when it is dragged into the document instead of having to resize the object after the object has been added to the screen. The following Report menu options are available: •
• •
Insert Field: The Insert Field menu item provides the ability to add a custom ield to the report. Insert Predeined Field: Highlighting the Insert Predeined Field menu item displays a list of predeined ields that can be added to the report by clicking on the menu item of interest. Insert Graphic: Highlighting the Insert Graphic menu item displays a list of graphics that can be added to the report by clicking on the menu item of interest. [ 162 ]
•
Chapter 8
Picture: Selecting the Picture menu item will bring up a window to select the picture to add to the section.
Upon selecting any option from the menu, the mouse cursor will switch to a plus sign, where the object can be drawn onto the report by left-clicking and dragging to the desired size.
Removing content Any object in the report section can be removed by highlighting the object(s) and pressing the Delete key, by selecting Delete from the right-click menu or by selecting Remove Selected Items from the Report menu.
Resource Manager The Resource Manager is used to centrally manage all of the images in the document, where a single image can be reused across sections without needing to import the image into the document multiple times. The Resource Manager can be accessed by opening the Tools menu and selecting the Resource Manager menu item. The Resource Manager window appears as shown in the following screenshot:
The Resource Manager window has a toolbar at the top with buttons for adding a new picture to the document and for changing the view of the list of pictures in the main section of the window. Right-clicking on a picture brings up the following list of options for modifying and maintaining the object: •
• •
Replace provides the ability to update the image with a new picture, updating the picture throughout the dependent sections with a new picture. Merge Duplicates provides the ability to merge the multiple copies of a picture in the document with a single version of the image. Merge All Duplicates performs a merge on all of the duplicate iles in the Resource Manager. [ 163 ]
Reports
• •
•
Delete removes the iles from the document. When a picture is removed from the Resource Manager, the image outline may still need to be removed from a Report or Dashboard section. Rename provides the ability to change the ilename. Properties display information on the ile type, size, import date, and source.
Building Report tables A Report table is similar in appearance and behavior to a Results or Table section. Fields are added to the table by highlighting the table of interest in the report and then dragging elements from the desired Results or Table section of the Elements window to the Table Dimensions or Table Facts area in the Table window.
Table window The Table window is displayed similar to the Data Layout window of other section and appears at the bottom-right portion of the main window. An example of the table window is shown in the following screenshot:
If the Table window is not initially shown, the window can be accessed by clicking on the Table icon in the Section Title Bar.
Table dimensions and facts Similar to the behavior of a pivot table, the Table Dimensions are the non-fact elements that are displayed to the left of the table and the Table Facts are the numeric columns that are displayed on the right-hand side of the table. The Table facts are summarized by a Data Function similar to the Facts in a pivot. The following example shows a table with dimension and fact items populated.
[ 164 ]
Chapter 8
Dimension and fact properties Dimension and Fact columns contain properties that can be modiied to change the display of the data in the column. The Properties menu for the dimensions and facts is accessed through highlighting and right-clicking on the column(s) of interest. The following options are used to modify Dimension and Fact columns: •
• •
Show Column Titles toggles the column titles for all columns to the on and off positions. Text Wrap toggles the wrapping of the text in the selected column(s). Suppress Duplicates removes any duplicate data item in consecutive rows from the top-down. Removing duplicates from a column is typically used with sorting options to align the data properly to create a view similar to a Pivot.
[ 165 ]
Reports
The following options are also provided to modify Fact columns: •
•
•
Data Function is used to change the data function of a Fact column from the default Sum to another prebuilt function. The Data Function menu can also be accessed from the Report menu. Show Column Total is used to add a column total to the bottom of a column. Pivots require the total values to be computed for each Fact item, but the Report provides the ability to show or hide each Fact column total independently. True Total Computation toggles calculating the total lines of the document by the computation of the values shown in the table or by the values contained in the dataset behind the section. When toggled on, the total columns show the total of the values shown in the table. When toggled off, the total calculation uses values from the dataset. This feature most commonly applies to calculating percentages, where the True Total Computation should be toggled off to show a correct percentage calculation in the total row of the table.
Break totals Break totals are totals split out by distinct values in a dimension and can be added to a table similar to adding break totals in a Results section. Break totals are added by one of the following methods: Report menu method
Right-click method
Click on the Report menu and select Break Total.
Highlight a column of data in a table, right-click, and select Break Total.
Set the break column, set the break function, and select the columns to total.
Set the break column, set the break function, and select the columns to total.
Sorting results Sorting in a table is similar to sorting in the Results section, where the Sort line allows the addition and organization of multiple columns into a sort order. The Sort window can be toggled to the on position by clicking on the Sort button in the Section Title Bar. Each table is conigured independently, where highlighting the table populates the Sort line with the sort coniguration for the table. Elements are added to the Sort line by one of the following methods:
[ 166 ]
Chapter 8
Report menu method
Right-click method
Drag-and-drop method
Highlight the data in the column to sort.
Highlight the data in the column to sort.
Highlight the data in the column to sort.
Click the Report menu, highlight the Sort menu item and select Ascending or Descending.
Right-click and select Sort Ascending or Sort Descending.
Drag-and-drop the column into the desired location of the Sort line.
All of the options will add or modify the current sort coniguration. Elements are rearranged in the Sort line by highlighting the name of the element and dragging the item to the left or right of another element and then clicking on Sort Now. Elements are removed from the Sort line by highlighting the element name in the Sort line and either right-clicking and selecting Remove or by pressing the Delete key.
Removing elements Elements are removed from tables by one of the following methods: Report menu method
Right-click method
Keyboard method
Highlight the column of data in the table section or the data element in the Table window.
Highlight the column of data in the table section or the data element in the Table window.
Highlight the column of data in the table section or the data element in the Table window.
Open the Report menu and select Remove Selected Items.
Right-click and select Remove Column (removing from the table directly) or Remove (removing column from Table window).
Press the Delete key.
Report groups Report groups provide an additional method to break out data by separating the contents and data in the body of the Report into subsets based on columns of data. Multiple levels of groupings can be added providing the lexibility to create sub-groups of data and objects.
Adding report group content Groups are added to the report by selecting the element of interest from the Elements window and dragging-and-dropping the element into the Groups window. The Groups window is shown by default at the bottom of the main window and can be toggled on and off by clicking on the Groups button in the Section Title Bar. [ 167 ]
Reports
When an element is added to create a group, the body of the report is split out by each distinct item of data from the column. In the following example, the report created contains a Table, Pivot, and Chart. The irst page of the report displays a Report Header containing all three objects. In the Report Header, all three display objects contain the summary information for the entire Results section of data.
Continuing with the example, the same display objects are also added to the body of the report and an element called Product Categories is added as a Report group to separate the body of the report by the elements in the Product Category ield.
[ 168 ]
Chapter 8
Notice that the totals of the data objects in the body are less than the objects in Report header on the irst page of the report. The objects in the report are the same between the Body and Report header, but the Report group facilitated the separation and iltering of the data automatically for the objects.
[ 169 ]
Reports
A new Section boundary area is created for each Report group added to the report. The previous example shows the two Report Group Section Boundaries with the name Report Group Header, the number of the Report group, the Results or Table section name, and the column(s) used in the Report group. In addition, the Section boundary is populated with Field elements for each ield added to the Report group. In the example above, the Electronics, Y Box games, Game consoles, and Y Box accessories labels display the output from the ield added to the report. These ields can be edited by customizing the expression on the report (discussed later in the chapter). The Section boundaries created by adding a Report group also allow for the addition of objects, including Pivots, Charts, Fields, Text labels, and other content from the Element window.
Sorting groups Groups can be sorted by any element added to the Report group similar to sorting Report tables. Simply highlight the text ield in the Report group and sort the object by one of the following methods: Report menu method
Right-click method
Drag-and-drop method
Click the Report menu and highlight the Sort menu item
Right-click and select Sort Ascending or Sort Descending
Drag-and-drop the object into the desired location of the Sort line
Select Ascending or Descending
Focusing and hiding report group content Similar to Pivots, data in Report groups can be focused or hidden to remove data items from the report. Simply highlight the text object in the report and Focus or Hide by using one of the following methods: Report Menu Method
Right-Click Method
Click the Report menu and select Focus on Item or Hide Item
Right-click and select Focus on Item or Hide Item
The Focus and Hide features can be reversed by highlighting a text object in the same Report group and selecting Show Hidden Items to show all hidden items in the selected Report group. In addition, selecting the Show All Items from the same menus will unhide all of the hidden items in the report.
[ 170 ]
Chapter 8
Creating and modifying expressions Expressions are the code deinitions of items on the report, including ields, Table facts, Table headings, and Report group elements. Expressions provide the lexibility to leverage custom logic to edit the behavior of the columns and data items in the document. Expressions are displayed in the Expression window. The Expression window is a thin window with a Data Function drop-down and a text area for displaying and modifying the expression. The Expression window is shown by default at the top of the main windows and is toggled on and off by clicking the Expression button in the Section Title Bar. When expressions are edited, a red x and green checkmark icon appear between the Data Function and textbox in the window. Selecting the green checkbox will save the expression changes and selecting the red checkbox will undo the expression modiications. Expressions may contain text, predeined functions, and data elements from Tables and Results throughout the document. Expressions are also case-sensitive and contain speciic syntax to reference data in each section, computations, conditional logic, predeined ield functions, or plain text.
Table expressions Table expressions are the editable expressions of the Fact columns of the table. Each Fact column of data from a Results or Table section contains a speciic mapping to the column of data from the section. The following sample is the expression for a Sales column in the R_Sales Results set. Tables("R_Sales").Columns("Sales").Sum(currBreak)
The expression irst references the section of the document, then the column, and inally the data function to use on the item of data. Notice inal value assigned in the data function is the word currBreak. The currBreak identiier is used by Interactive Reporting to identify the level of detail to split out the data in the report. The data function can be edited by hand in the Expression window or it can be modiied using the data function drop-down. The expression can be changed by adding logic into the Expression window or by modifying the column (address in the next section of this chapter).
[ 171 ]
Reports
Predeined ield expressions
Predeined ields are commonly used throughout the document. These ields contain predeined expression, and the ields exist under the Fields item in the Expressions window. When predeined ields are added to a report, the ields contain custom functions used to exhibit a particular behavior. The following is an example of the syntax of the predeined Page X of Y ield. "Page "+PageNm+" of "+PageCount+ ""
Notice the text values of the expression are wrapped in quotations and the predeined functions are displayed without.
Report groups Report groups behave similarly to Table expressions. As Report group items are added, the item names are referenced in a ield in the Section boundary for the report. The Report group expression is displayed as follows: currBreak.Value("Prod_Subcategory")
The Report group ield can be modiied to the following to add a label to the item as shown here: "Subcategory: " + currBreak.Value("Prod_Subcategory")
Embedding desired text labels into the expression will reduce the need to add additional text labels and will make formatting and arranging the text easier.
Custom ields
Custom ields are created by adding the Field element from the Elements window into the report. The following is an example of a report with three custom ields added.
[ 172 ]
Chapter 8
Notice the three ields contain three separate Sales totals. The following expressions are the deinitions for the ields in the document, where the value displayed is based on the break or section of grouped data in the report: "Sub-Group: " + Format(Tables("R_Sales").Columns("Sales"). Sum(currBreak),"#,##0.000") "Group: " + Format(Tables("R_Sales").Columns("Sales").Sum(currBreak. parent),"#,##0.000") "Grand Total: " + Format(Tables("R_Sales").Columns("Sales"). Sum(currBreak.parent.parent),"#,##0.000")
The irst expression totals the data for the sub-group of values. The total from that item matches the total in the Sales table in the previous example. The Group and Grand total ields contain a .parent and .parent.parent after the currBreak in the expression. The .parent method allows the ability to expand the break to include the set of values above the current grouping. Additionally, the .parent. parent provides the ability to step two levels above the current grouping. In this example, the .parent.parent provides the total for the entire set of data results since there are only two levels of grouping in the document. The .parent option can be repeated as many times as necessary to obtain the level of summary desired.
Formatting expressions Notice the Format function wrapped on the expressions above. When numeric expressions are concatenated with text, the number formatting for expression is dropped. To reformat the number, the Format function must be included in the expression. The Format function can be used at any time, where the irst argument is for the ield to be formatted and the second argument is for the format parameters. A list of number formats can be obtained by opening the Number Formatting window by accessing the Format menu and selecting the Number menu item. The Format expressions in the Format section of the window can be used in the Format function as demonstrated in the previous examples.
Combining data from multiple queries Report tables provide the ability to combine and calculate data across multiple datasets. In the Table object, fact data from multiple queries can be displayed as well as integrated through calculated items. The Report functionality allows for the integration of two or more datasets from different queries, where each dataset can contain a different level of detail. [ 173 ]
Reports
The integration of data behaves similar to building a query with outer joins. When a table is built, the Table Dimensions may be built from only one dataset in the document. The Table Dimensions serve as a key or set of criteria for the additional data sections to follow. When adding an additional dataset fact to the document, the additional dataset must contain columns that match the columns used in the Table Dimensions, where the column names and datatypes are exactly the same. As Facts are added from additional datasets, the data displayed from the additional data sections are only the igures that match the Table Dimensions from the driving dataset. The following examples will demonstrate the combination of a Sales and Costs dataset across Fiscal Years, where Sales is the driving dataset and Cost is the accompanying dataset. In the irst example, the Fiscal Year column from the Sales results is added to the Table Dimensions, the Sales column from the Sales results is added to the Table Facts, and the Cost column from the Cost results is added to the Table Facts. In the irst example, more years of Sales igures are tracked than Costs. Since Sales is the driving dataset, all of the Sales dimension values display from 1998 through 2002, but only the 2000-2002 cost igures are displayed. Notice in the following screenshot that all of the Sales facts for all Fiscal Years are displayed but only those Cost facts are displayed for the Fiscal Years in which the Cost igures exist:
In the second example, there are Cost igures from 1998-2002 but only Sales igures from 1999 and 2001. Notice in the igure below that the only data from both datasets shown is for the years 1999 and 2001. Since the Sales table is still the driving dataset, the addition years of Cost facts are ignored and the only Cost facts displayed are the years where the Sales facts exist.
[ 174 ]
Chapter 8
Adding computed items and modifying items Since combining data from multiple queries allows for the addition of computations, a computed item can be added to this section showing the difference between the Sales fact and Cost fact columns. Computed items are added through one of the two following options: Report menu method
Right-click method
Highlight a column of data inside the table.
Highlight a column of data inside the table.
Open the Report menu and select Add Computed Item.
Right-click and select Add Computed Item.
When a computed item is added, the Computed Item window appears as shown next:
The irst available item in the window is the ability to add a custom name for the column. Below the name ield is the coniguration for selecting a ield from a table. Notice that only one table is listed in the table's listbox. While it may appear that computed items can only be accessible from the Sales results, the Cost results can easily be added to the table. While the formula can be custom entered, it is easier to copy and paste the expression from the columns into the formula. Unlike Pivots and Charts, every Fact column in the table can be modiied. The expression for the columns can be copied by highlighting the column, right-clicking, and selecting Modify Column or by highlighting the column and copying the column deinition from the Expression window. [ 175 ]
Reports
The formula for the computed item can be entered either in the Computed Item window or the Expression window. The following screenshot shows an example of the Proit column calculated in the Computed Item window:
The computed items feature of the table provides signiicant lexibility including conditional logic and complicated computations.
Exporting and printing Reports can be exported to many formats, but the most common formats used are the PDF format, JPG format, and the Microsoft Ofice HTML option. To export a report, access the File menu, highlight over Export, and select Section. The Export Section window appears with the ability to name the ile and select the type of the ile to create. The PDF format will create a PDF document with a page for each page displayed on the report. The JPG format will produce a JPG image for each page. The JPG format can be used to copy the images into a PowerPoint presentation. Finally, the Microsoft Ofice HTML option creates a document that can be opened in a web browser or in Microsoft Excel. When the Microsoft Ofice HTML option is used, the charts in the document convert to images but the pivots and charts display as text in cells with formatting. This is beneicial when attempting for modify the exported content. The Report can also be printed by accessing the File menu and selecting the Print option.
[ 176 ]
Chapter 8
Summary The focus of this chapter was to provide business analysts with the tools needed to create and leverage the Report section to analyze content, integrate data, create formatted documents, and reduce the effort needed to create deliverables. The chapter began with an overview of the format of the report, explaining the different sections and methods used to setup and conigure the section. The chapter continued with an overview of how to add content to the section with an explanation of the different types of objects available for customization and inclusion. The chapter provided an explanation of the Report table and Report group features of the section, and provided examples on how these features are leverage in the section to analyze content. The chapter continued with an explanation and examples of the more advanced features of the section, including modifying expressions and combing data from multiple datasets. The chapter concluded with the best methods for exporting and printing the section.
[ 177 ]
Dashboards The term Dashboard is typically used to describe an executive level report displaying key business indicators in an effort to capture the health of a business at a point in time. The Dashboard sections provide the business analyst with tools to create professional executive level dashboards, and the section provides the analyst the lexibility to add controls and custom programming to each dashboard to add interactivity or to create a custom interface for users. The goal of this chapter is to present the methods to leverage each object of the section to support the business analysts in creating professional executive dashboards. This chapter covers: • •
Creating and editing dashboards
•
Building a dashboard
•
Working with controls
• • •
Dashboard elements Coniguring gauges and live charts Adding interactivity Methods for exporting and printing
Creating Dashboard sections Dashboards are added to the document by selecting the New Dashboard item from the Insert menu. When a new Dashboard section is added, the dashboard object appears at the top of the document above all other section types. The Dashboard section is query independent, where content can be added to the dashboard from any section in the document. Dashboards can also be duplicated by right-clicking on the section name in the Section Catalogue and selecting Duplicate section. The default name of the section when added is Dashboard and renaming and removing the section is consistent with the methods of renaming and removing other sections in the document demonstrated in the Chapter 6 in the Creating Pivots section.
Dashboards
Understanding the Dashboard layout The Dashboard layout provides the ability to add objects from the report similar to a Report section, where objects can be dragged-and-dropped and resized on the interface. Objects can be added to any area of the dashboard, providing the ability to create a custom layout of objects.
Editing the dashboard A new dashboard by default is set with the Design Mode active, which turns the dashboard from an active to a passive state so that the dashboard can be modiied. When the dashboard is in design mode, the Elements window displays the objects that can be added to the section, the Dashboard controls display the control name, and all objects on the dashboard can be edited and rearranged. When the Design Mode setting is toggled off, the Dashboard objects become active, the Elements window is blank, and the objects on the dashboard display the desired content. Design Mode can be toggled on and off using one of the following three methods: Report menu method
Section toolbar method
Keyboard method
Open the Dashboard menu and select Design Mode
Click on the irst button (Design Mode) on the Section toolbar
Press Ctrl+D on the keyboard
When the dashboard is in design mode, the dashboard provides the following helpful guidelines for arranging content: • •
•
Design Guidelines: The horizontal and vertical lines used to align content in the section Grid: Applies a grid to the report used to align content in the section Rulers: The rulers displayed at the top and left of the main window used to position content
The design guides only show when the dashboard is set to Design Mode and can be toggled on or off at any time.
[ 180 ]
Chapter 9
Dashboard objects The Dashboard section allows for the use of all of the data presentation sections in the document as well as objects speciic to the Dashboard section. The available objects are displayed in the Elements window of the section. The Elements window in the dashboard is similar to the Report section, where a large set of objects exist that can be added to the dashboard including Query elements, Reports, Pivots, Charts, Results, and Tables as well as Graphics, Controls, Gauges, Live Charts, and Resources. The following screenshot shows an example of the Elements window for the Dashboard section.
Query objects The Elements window groups each object associated with a query underneath the query name, including Pivots, Charts, Tables, and Results. The section also lists the individual elements available in the Results and Table sections. These individual elements cannot be added directly to the dashboard, but the elements are used in the Gauges and Live Charts.
Reports The ability to add Reports onto the dashboard has evolved with recent releases of Interactive Reporting. Reports do not scale on the dashboard similar to other objects, where the Report object needs to be expanded to encompass the entire report section without scrolling. When the dashboard design mode is toggled off, the section appears with scroll bars allowing for the viewing of the entire section.
Graphics Graphics enhance the look and feel of the dashboard and should be used to separate content, add logos and pictures, and signiicantly enhance the look and feel of the section. These objects are similar to the Graphics objects in the Report section and include Lines, Rectangles, Ovals, Text labels, and Pictures. Graphics are drawn and formatted in the document to enhance content. [ 181 ]
Dashboards
Controls Controls are the most common dashboard object and are used to control the content displayed on the dashboard section. The controls are used to execute an activity, where JavaScript syntax code is used along with Interactive Reporting speciic objects to drive a desired behavior. The working with Controls section of this chapter shows examples of how to add and conigure controls on the dashboard.
Gauges Gauges are a more recent addition to Interactive Reporting and are used to display a quick view of a key business indicator. The gauges in Interactive Reporting are limited to a Bullet, Speedometer, Thermometer, and Trafic Light. Each gauge has a coniguration tab in the Gauge properties allowing for the custom coniguration of the thresholds of each object when the dashboard is in Design Mode.
Live Charts Live Charts are also a more recent addition to Interactive Reporting and are similar to a Chart section but can only be used in a Dashboard section. There are six types of charts including Bar, Block, Funnel, Line, Pie, and Radar. The Live Charts are limited in functionality compared to the Chart section, but are more graphically appealing and scale better than the Chart section when used on a dashboard.
Resources Resources are pictures that have been added to the document either from the addition of a picture to a section in the document or the addition of the picture into the Resource Manager. As pictures are added to Interactive Reporting sections, the pictures are added to the Resource Manager allowing for the central management of all images. Pictures should be added to the dashboard from the Resources grouping where appropriate.
Building a dashboard Building a dashboard is similar to building a report. When the dashboard is set to Design Mode, elements from the document can be dragged-and-dropped from the Elements window onto any area of the dashboard. In addition to using the drag-and-drop method, objects can also be added to the dashboard by selecting an object from the Insert set of menu options in the Dashboard menu.
[ 182 ]
Chapter 9
The following image is a sample dashboard created off of data from the sample Sales model example:
The previous dashboard is a compilation of different Dashboard objects including a Chart, Live Chart, Gauge, Report, and Pivot section. The dashboard is also conigured with a few Graphic objects including Text Labels and Hz Lines.
[ 183 ]
Dashboards
Adding sections The presentation sections of the document are added to the dashboard to display data in any format previously created for analysis, providing the ability to display a snapshot of the different sections in the document to the user on one screen. Pivots, Charts, Results, Tables, and Reports are added to the dashboard by dragging-and-dropping the content from the Elements window onto the dashboard. Once the objects have been added to the dashboard, the sections can be resized and edited as necessary. The only section that by default resizes when added is the Chart section, where the other presentation sections require the properties of the object to be modiied to add the Auto Resize option. To access the properties of the dashboard object, highlight the object on the dashboard, right-click, and select the Properties menu item or select the Properties menu item from the Dashboard menu. Along with the Auto Resize option, all of the presentation sections provide three options for specifying the functionality of the section on the dashboard. The following options can be toggled by modifying the properties of the object. •
•
•
The View Only setting makes the document a static image on the dashboard. The Active setting allows the analysis options of the section to become enabled in the dashboard. For instance, the ability to drill into and analyze a Pivot section exists when the Active setting is enabled. The modiications take place on the Dashboard screen and are retained in the section. The Active setting is not available in the Report object. The Hyperlink setting turns the document into a clickable item, where the link to the section is the default hyperlink. Since the link is controlled by custom code, the hyperlink logic can be modiied to include any custom behavior of interest.
Adding graphics and resources Graphics and resources are easily added to the dashboard similar to adding the objects to a Report section. The two methods for adding these objects include dragging-and-dropping the objects from the Element window on the dashboard and then resizing, or by selecting the object of interest from the Insert Graphic menu item of the Dashboard menu and drawing the object onto the Dashboard.
[ 184 ]
Chapter 9
Adding gauges, live charts, and controls Gauges, live charts, and controls are added to the dashboard by using the drag-and-drop method from the Elements window or by selecting the desired object of interest from the Insert Gauge, Insert Live Chart, or Insert Control menus in the Dashboard menu. Once the chart or gauge is added and resized on the dashboard, the object must be conigured with data before the object displays on the screen when the dashboard is set to active. Coniguring gauges, live charts, and controls are discussed in the following sections of this chapter.
Removing content Any object on the dashboard can be removed by highlighting the object(s) and pressing the Delete key, by selecting Delete from the right-click menu, or by selecting the Remove Selected Items from the Dashboard menu.
Adding content example The following example will demonstrate the steps for adding content to the dashboard to create the dashboard view shown at the beginning of the Building a dashboard section. Starting with a blank dashboard, a title is added to the document by expanding the Graphics in the Elements window and dragging-and-dropping the Text Label object onto the dashboard. Once the Text Label is added to the dashboard, the formatting, sizing, and label can be modiied. In this example, the font is set to Andale WT and the font size is set to 24pt by editing the font settings on the Formatting toolbar. Left-clicking into the Text Label allows for the text to be edited on the screen. After left-clicking, the title was set to Total Sales Dashboard and the width of the object was expanded by dragging the object sizing squares with the object highlighted.
[ 185 ]
Dashboards
All of the modiications to the title are as shown in the following screenshot:
Continuing with the example, expanding the Q_Sales grouping in the Elements window and dragging-and-dropping the Pie chart onto the dashboard adds the Chart section named Pie onto the dashboard. The Pie chart section was created previously under the Q_Sales section to display Sales by Year. Chart titles can be added in the section, or manually by adding a Text Label to the dashboard as shown in the following screenshot. The Chart – Pie label was dragged-and-dropped similar to adding the title to the document and the font was set to Andale WT, the size was set to 9pt, and the font weight was set to Bold using the Formatting toolbar.
[ 186 ]
Chapter 9
The live chart and gauge are added to the dashboard by expanding the gauges and live charts grouping of the Elements window, dragging-and-dropping the Bullet and the Bar to the Dashboard screen, and resizing as shown in the following screenshot. The labels are also added by adding Text Labels to the Dashboard similar to adding the Pie chart label.
[ 187 ]
Dashboards
After the live chart and gauge are added to the screen, the objects must be populated with ields from a Results or Table section. Content is added to these sections by left-clicking on the chart on the dashboard to display the section Data Layout at the bottom of the Dashboard window. In this example, the Total Sales and Fiscal Year ields from the R_Sales grouping under Q_Sales in the Elements window are dragged-and-dropped to the Fact and X-Axis items of the Data Layout of the Bar live chart as shown in the following screenshot:
Additionally, the Sales and Sales Target ields were added from the R_Sales grouping of the Elements window into the Fact and Target of the Bullet gauge. Horizontal lines were added to the dashboard by dragging-and-dropping the Hz Line from the Elements window onto the dashboard. The lines can then be resized by dragging the line to the desired size. In the next example, the lines were dragged across the dashboard to separate the content into three sections for graphical appeal. The lines in the example were made darker by right-clicking, selecting the Properties menu item, and then changing the Border Width on the border and background tab of the line. Additionally, the Groupings report was dragged-and-dropped from the Reports section of the Elements window to the dashboard and was resized. The following screenshot shows both the added horizontal lines and report on the dashboard.
[ 188 ]
Chapter 9
The Pivot was added to the dashboard by dragging-and-dropping the Sales Pivot from the Q_Sales grouping in the Elements window and resizing to the desired size similar to adding the Pie chart. Finally, the Drop Down control was added to the Dashboard by dragging-and-dropping the Drop Down object to the dashboard and the Product Category Text Label was added similar to creating the other Text Labels on the dashboard as shown in the following screenshot:
[ 189 ]
Dashboards
Additional information for coniguring gauges, coniguring live charts, and using the Drop Down control for building an Interactive dashboard are covered in the next sections of this chapter.
Coniguring gauges When a gauge is added to a dashboard, the gauge must be populated with data elements from a Query section, and the properties of the gauge can be conigured to produce the desired view of interest. The following image is a sample of each of the four gauges on a dashboard:
Each gauge contains a Fact element and all of the gauges besides the Trafic Light contain a Target Fact element. When a gauge is clicked and highlighted on the dashboard during design, a Data Layout window appears at the bottom of the main screen with areas to add data elements from Query results or a table. Dragging-and-dropping the desired elements from the Elements window into the Data Layout area will conigure and populate the object with data. After adding the elements to the section, making the dashboard active will display the populated object. [ 190 ]
Chapter 9
When viewing the gauges (other than the Trafic Light), notice the gauges show the Fact in either the black line or speedometer needle and the Target Fact is displayed with the blue object. The Stoplight does not contain similar features, but is conigured to display a color status based on a range of values. All of the gauges are dynamic and updated based on the data contained in the referenced query.
Gauge properties and color ranges Notice the color ranges speciied on the objects. Each of these ranges is conigured in the Properties menu of each gauge. The Properties menu of the gauge can be accessed by highlighting the gauge on the dashboard, right-clicking, and selecting the Properties menu item or by highlighting the gauge and then selecting the Properties menu item from the Dashboard menu. The following screenshot is an example of the Bullet Gauge Properties menu open to the Bullet tab.
[ 191 ]
Dashboards
Each gauge object contains a Gauge-speciic properties tab, where the tab provides the same general settings as the previous screenshot where the Theme, Style, and Color Range settings exist for each gauge type. In the previous example screenshot of the Gauge Properties, the default coniguration is used and Color Range has been conigured based on the data in the Sales sample to show the different color ranges on the gauge. When coniguring a color range, Min and Max values and the desired color are required. However, the Min of the irst range and the Max of the inal range can be left blank to specify no bound on the lower and upper ranges of the gauge. In addition to the range and color, the Tooltip setting is used to add a text label to the gauge. The Tooltips are displayed when the mouse cursor is highlighted over the color range in the gauge. Clicking on the Add button allows for the addition of additional ranges. The other tabs in the Properties menu are speciic to setting the generic object, number, and font formatting for the gauge.
Coniguring live charts
Coniguring the live chart objects is similar to coniguring gauges. When a live chart is added to a dashboard, the live chart must be populated with data from a Query section. Additionally, the properties of the live chart can be modiied to produce the desired chart display of interest. The next two screenshots are examples of the six types of live charts available for use in the document. The following screenshot shows the Block, Pie, Funnel, and Radar live charts:
[ 192 ]
Chapter 9
[ 193 ]
Dashboards
The following screenshot displays an example of a Bar and Line live chart:
When the dashboard is under design, clicking and highlighting the live chart will bring up the Data Layout window. Each live chart contains a Fact area and chart-speciic non-fact areas for adding data elements. Dragging-and-dropping the desired elements from the Elements window into the Data Layout area will conigure and populate the object with data. After adding the elements to the section, making the dashboard active will display the chart populated with data. The live charts are dynamic with the data contained in the related Query section. Any changes to the data will update the display of the live chart on the dashboard.
[ 194 ]
Chapter 9
Live chart properties Similar to charts and gauges, live charts contain a chart-speciic tab in the Properties window for modifying the live chart display. The Properties menu of the live chart is accessed by highlighting the live chart on the dashboard, right-clicking, and selecting the Properties menu item or by highlighting the live chart and then selecting the Properties menu item from the Dashboard menu. The following screenshot is an example of the Bar live chart Properties menu open to the Bar tab.
The chart-speciic properties tab provides all of the features that can be modiied for the live chart. This menu provides the ability to modify the chart display features, axis scales, legend, and labels for each of the chart objects. The other tabs are used for setting the formatting of the chart and the Object tab contains a textbox for the chart title.
Working with controls Controls provide the ability to drive a set of operations inside the document through scripting. This book has focused on setting objects and parameters using the Interactive Reporting menus and screens, but Interactive Reporting also provides the ability to script many of the operations inside the document. This section will provide an overview of how to access, build, and execute some of the simple tool behaviors. The examples will focus on building controls on the dashboard to assist with iltering the presentation sections of the document using Interactive Reporting programming methods. [ 195 ]
Dashboards
Control types There are ten different control types, with eight focused on performing operations on a dashboard and two (Embedded Browser and Hyperlink) focused on external content. The objects can be visible or hidden and can be enabled or disabled on the dashboard. The following is a breakdown of each type of control: •
• • • •
• •
•
The Command Button is a button on a dashboard that is used to drive behavior when clicked. Radio Buttons are used to select an item from a group of items. Radio buttons appear like checkboxes but only one can be selected in the deined group. The List Box displays a list of values available for selection. The listbox provides the ability to select multiple values. The Drop Down is a list of values that displays one value at a time and allows a single selection from a list of populated values. The Text Box accepts a text value or can be used to display a text value. The Slider behaves similar to a Radio Button allowing for a selection of a value from a group of values. The Slider shows all of the values on a bar with a graphic allowing for the user to slide the graphic to the selection of interest. The Embedded Browser allows for the embedding of a web page or object from the Hyperion repository inside the Embedded Browser window. The Hyperlink is a text label providing the ability to open a web page or object from the Hyperion repository.
While controls are focused on facilitating activities in the document, items such as graphics, pictures, and any object allow for the addition of code similar to a control.
Script Editor The Script Editor is the interface where code is written to perform an operation in the document. The Script Editor is opened by selecting the Scripts menu item from the Dashboard menu or by right-clicking on an object on the dashboard and selecting Scripts. The following screenshot is an example of the Script Editor.
[ 196 ]
Chapter 9
On the left of the editor window is a library of all of the different operations that can be performed in the program. The window is currently open to the Application | Active Document | Sections area. This area contains all of the sections created in the document and updates as the sections are added and modiied. At the top of the editor window is the Object and Event Trigger drop-downs. These drop-downs are used to select the trigger to perform the code operation. In the sample image, the event would be the activation of the section with the name Dashboard. Other examples include an object such as a Command button with the Event Trigger set to OnClick. Each object and trigger can contain its own set of code and each are maintained individually in the Script Editor. Since there is not an easy method to view all of the scripts in a document through the Script Editor, the Scripts to Text File menu item in the File | Export menu provides an export of all of the scripts in the document by Object and Event Trigger.
[ 197 ]
Dashboards
Building an interactive dashboard Typical management dashboards provide a set of business metrics and a level of iltering operation to allow users to drill into the set of metrics. This section of the chapter will use the Dashboard example provided earlier to demonstrate the coniguring of a Drop Down control to ilter the data displayed on the dashboard. The following screenshot is the Total Sales Dashboard with the Drop Down control added in the upper-right of the dashboard:
Notice the drop-down box is currently populated with the All Product Categories item. The items in the Drop Down can be manually populated through the Values tab of the Drop Down properties. However, scripts can also be used to populate the control from a list of items from a dataset in the document.
[ 198 ]
Chapter 9
Populating Drop Downs with a script The safest way to create an object that will be used to ilter data in a dataset is to make sure the values set in the Drop Down match the values in the column of the dataset that will be used for the ilter. The correct method to perform this operation is to script a set of operations in either the Document scripts (scripts that execute when the document is opened or closed) or Dashboard OnActivate scripts with code to populate the Drop Down. In this example, the dashboard OnActivate coniguration will be used to populate the Drop Down on the dashboard with the Product Category information from a Results section. There are a number of different methods for populating the Drop Down, and the following example is an eficient method for executing the operation. The irst step in the coniguration is to activate the Results section where the data from the dashboard is located. From the Results section, locate the column of interest and add the column to the Filter line. Select Show Values and select the irst value. The column, in this case Prod Category, will be used for both the extraction of a distinct list of values and to ilter the data when the Drop Down is switched between values. When the ilter is set, open the Script Editor by selecting the Scripts menu item from the Dashboard menu. The editor will open with the settings Object: Dashboard (Section) and Event Trigger: OnActivate. The following script can be entered by hand, but it is easier to use the library of values as demonstrated in the following steps. Expand the library of elements to the following Application | ActiveDocument | Sections | Dashboard | Shapes | ddDropDown | Methods and double-click on RemoveAll. Upon double-clicking, the following line of code is written to the editor code area. ActiveDocument.Sections["Dashboard"].Shapes["ddDropDown"] .RemoveAll();
Continuing with the code example, the following steps are used to load the Drop Down from the values in the Results section: 1. Remove all values from the Drop Down. 2. Add an All Product Categories value. 3. Refresh the available values in the Results section ilter item. This step refreshes the distinct list of values in the ilter to the most current values. 4. Loop through the available values and populate the Drop Down.
[ 199 ]
Dashboards
The following code is the inal product of all of the steps. Each action in the step can be found in the library of values except for the for loop syntax. // Remove all values from the Drop Down on the Dashboard ActiveDocument.Sections["Dashboard"].Shapes["ddDropDown"]. RemoveAll(); // Add a Line for All Values ActiveDocument.Sections["Dashboard"].Shapes["ddDropDown"].Add("All Product Categories") // Refresh Avaliable Values of the Results Filter ActiveDocument.Sections["R_Sales"].Limits["Prod Category"].RefreshAvailableValues(); //Loop Through the Avaliable Values (i - variable used for the counter) //Stop when the count reaches the total Available Values //Increment the Counter (i++) for(i=1;i Greater Than option 36 >= Greater Than or Equal option 36 < Less Than option 36 = Greater Than or Equal option 36 advanced button 37 Begins With option 36 Between option 36 Contains option 36 Ends With option 36 ilter name box 37 ignore button 37 Include Nulls checkbox 37 Is Null option 37 Like option 36 Not checkbox 37 intersection operator 86 Is Null option 37 items, report modifying 175, 176
[ 207 ]
J
M
joins about 59 left join 60 outer join 60 right join 60 simple join 60
menus, web client interface about 15 edit menu 16 ile menu 16 format menu 16 help menu 16 insert menu 16 tools menu 16 view menu 16 metadata identifying 52 meta topics about 61, 62 creating 62-64 data model topic view, changing 66 editing 65, 66 promoting to 65 minus operator 86 multiple queries combining, in one model 69 data, combining from 173, 174
K key Alt key 51 Ctrl key 32 End key 51 Shift key 32
L label content, Pivots arranging 115, 116 label heading, Pivots managing 116 labels, chart sorting 152 Last_Day function 80 left join 60 legend, chart 148 Like option 36 line charts 143, 144 live charts, dashboard adding 185 coniguring 192, 194 properties 195 live charts, dashboard objects 182 local machine documents, opening from 13 documents, saving to 18 local results about 69 derivable queries 70 derivable queries, limitations 71 limitations 70 lower function 79
N nesting functions 80 Not checkbox 37 numeric functions 107 NVL function 79
O OCE iles 22 ofline mode 21 Open Catalogue Extension iles. See OCE iles OR operators 43-46 outer join 60
P password protecting, design mode 20 password protecting, documents 20 permissions interface, interactice reporting documents full control selection 25 inherit selection 25 [ 208 ]
modify selection 25 no access prevents 25 view selection 25 pie charts 140 Pivots about 111 adding, to report 161 column labels 114 computed items 122-127 conditional formatting 128, 129 content, adding 113, 114 content, analyzing 118 content, removing 115 corner labels 117 created, by results 112 created, by tables 112 data, drilling into 119 data functions 114 data heading, managing 116 data labels 116 Drillup 120 exporting 129 facts 114 focus functionality 120 formatting 128 hide functionality 120 label content, arranging 115, 116 label heading, managing 116 Pivot this Chart menu option 112 printing 129 row labels 114 section, creating 112 sections, removing 113 sorting 117, 118 totals items 122, 123, 124 pre-built data models working with 31, 32 predeined ield expressions about 172 custom ields 172, 173 expressions, formatting 173 report groups 172 printing, dashboard 202 printing, Pivots 129 printing, reports 176 Process All option 50 Process Current property 50
Process Custom property 50 processing options, query process all option 50 process current property 50 process custom property 50, 51 process property return irst property 52 return unique rows option 52 time limit property 52 Promote to Meta Topic menu item 65 Promote to Meta Topic method 65 properties, chart 153
Q Q_Sales (Query section) 30 queries, combining processing 86 query building 32 duplicating 57 options, in query section 51 processing 50 processing, options 50 process property 51 removing 57 query, building requests items 32, 34 requests items, removing 35 query log 90 query objects, dashboard objects 181 query section sorting 49 query section layout, interactive reporting about 30 section title bar 30, 31 sections window 30
R R_Sales (result section) 30 report about 157 charts, adding 161 content, adding 160 content, removing 163 design guides 160 exporting 176 [ 209 ]
expressions 171 ields, adding 162 footers 158 graphics, adding 162 headers 158 layout 158 pivots, adding 161 printing 176 resource manager 163, 164 resources, adding 162 sections, creating 158 setup 159 table, adding 162 tables, building 164 report groups about 167 content, adding 167-170 content, focusing 170 content, hiding 170 groups, sorting 170 report layout design guides 160 footers 158 headers 158 report setup 159 reports, dashboard objects 181 report tables, building about 164 break totals 166 dimension 165, 166 elements, removing 167 fact columns 165, 166 sorting results 166, 167 table dimensions 164 table facts 164 table window 164 request items about 76 drag-and-drop method 32 example 32-34 iltering on 48 removing 35 right-click method 32 resource manager 163, 164 resources adding, to report 162
resources, dashboard adding 184 resources, dashboard objects 182 results used, for creating chart 132 using, for creating Pivots 112 results section about 91, 92 break totals 103 columns, hiding 96 columns, moving 96 columns, removing 96-98 columns, showing 96 data, sorting 101 ilters 99 ilters, creating 99, 100 ilters, performance 101 grand totals 103 grouping columns 104, 105 removing 94 sorting, performance 102 status bar 101 totals, creating 102 totals, removing 104 Return First property 52 Return Unique Rows option 52 ribbon charts 144, 145 right-click method, ilters 35 right-click method, request items 32 right join 60
S scatter charts 147, 148 script editor, dashboard 196, 197 section catalogue, web client interface 15 sections, dashboard adding 184 section title bar, web client interface 17 sections window, query section layout 30 Shift key 32 Show Remarks menu option 52 show values option, ilters 38 simple join 60 sorting about 101, 102 data 49 [ 210 ]
in query section 49 performance 102 sorting, Pivots about 117, 118 manual sorting 118 sorting results, report tables 166, 167 sort key item, section title bar 30 stacked area charts 142, 143 status bar, query section layout 31 status bar, result section 101 status bar, web client interface 17 string manipulation 79, 106 Structured Query Language (SQL) about 75, 76 exporting 90 translation, from ilter 76 translation, from Request 76 translation, from sort 76 SubQuery option 82, 83 substring function 79
T table deinition changing 68 table dimensions, report tables 164 table expressions 171 table facts, report tables 164 table remarks identifying 52 tables adding, to report 162 used, for creating chart 132 using, for creating Pivots 112 tables, adding to data model about 58 joins 59, 60 table section about 92 auto-populating 96 columns, hiding 96 columns, moving 96 columns, removing 97, 98 columns, showing 96 creating 93
data, sorting 101 double-click method 93 edit-menu method 93 ilters 99 ilters, creating 99, 100 ilters, performance 101 grouping columns 104, 105 removing 94 right-click method 93 sorting, performance 102 table, duplicating 94 totals, creating 102 totals, removing 104 table window, report tables 164 text labels, chart inserting 153 Time Limit property 52 To_Char function 80 To_Date function 80 toolbars, web client interface formatting toolbar 16 section toolbar 17 standard toolbar 16 topic view 61 total items, Pivots about 122-124 data functions, for totals 124, 125 grouping 126 items in column tab renaming 125, 126 items in row, renaming 125, 126 totals, removing 125 totals break totals 103 creating 102 data functions 124, 125 grand totals 103 removing 104, 125 totals items, Pivots 122 Trim function 79
U union all operator 86 union operator 86 upper function 79
[ 211 ]
report section 14 results section 14 section catalogue 15 section title bar 17 status bar 17 table section 14 toolbars 16
V Variable Filter option 47 variable ilters 47 Var option 47 vertical bar chart 134 vertical bar-stacked chart 136 vertical cluster bar chart 140 vertical stack bar chart 138, 139
X
W
X-Axis Data Layout 139
web client interface about 14 chart section 14 dashboards section 14 menus 15 pivot section 14 query section 14
Y y-axis 148
Z z-axis 136, 139, 150
[ 212 ]
professional expertise distilled
P U B L I S H I N G
Thank you for buying
The Business Analyst's Guide to Oracle Hyperion Interactive Reporting 11 About Packt Publishing
Packt, pronounced 'packed', published its irst book "Mastering phpMyAdmin for Effective MySQL Management" in April 2004 and subsequently continued to specialize in publishing highly focused books on speciic technologies and solutions. Our books and publications share the experiences of your fellow IT professionals in adapting and customizing today's systems, applications, and frameworks. Our solution based books give you the knowledge and power to customize the software and technologies you're using to get the job done. Packt books are more speciic and less general than the IT books you have seen in the past. Our unique business model allows us to bring you more focused information, giving you more of what you need to know, and less of what you don't. Packt is a modern, yet unique publishing company, which focuses on producing quality, cutting-edge books for communities of developers, administrators, and newbies alike. For more information, please visit our website: www.packtpub.com.
About Packt Enterprise In 2010, Packt launched two new brands, Packt Enterprise and Packt Open Source, in order to continue its focus on specialization. This book is part of the Packt Enterprise brand, home to books published on enterprise software – software created by major vendors, including (but not limited to) IBM, Microsoft and Oracle, often for use in other corporations. Its titles will offer information relevant to a range of users of this software, including administrators, developers, architects, and end users.
Writing for Packt We welcome all inquiries from people who are interested in authoring. Book proposals should be sent to [email protected]. If your book idea is still at an early stage and you would like to discuss it irst before writing a formal book proposal, contact us; one of our commissioning editors will get in touch with you. We're not just looking for published authors; if you have strong technical skills but no writing experience, our experienced editors can help you develop a writing career, or simply get some additional reward for your expertise.
professional expertise distilled
P U B L I S H I N G
Oracle Essbase 9 Implementation Guide ISBN: 978-1-847196-86-6
Paperback: 444 pages
Develop high-performance multidimensional analytic OLAP solutions with Oracle Essbase 1.
Build multidimensional Essbase database cubes and develop analytical Essbase applications
2.
Step-by-step instructions with expert tips from installation to implementation
Middleware Management with Oracle Enterprise Manager Grid Control 10g R5 ISBN: 978-1-847198-34-1
Paperback: 350 pages
Monitor, diagnose, and maximize the system performance of Oracle Fusion Middleware solutions 1.
Manage your Oracle Fusion Middleware and non-Oracle middleware applications effectively and eficiently using Oracle Enterprise Manager Grid Conrol
2.
Implement proactive monitoring to maximize application performance
Please check www.PacktPub.com for information on our titles
professional expertise distilled
P U B L I S H I N G
Practical Data Analysis and Reporting with BIRT ISBN: 978-1-847191-09-0
Paperback: 312 pages
Use the open-source Eclipse-based Business Intelligence and Reporting Tools system to design and create reports quickly 1.
Get started with BIRT Report Designer
2.
Develop the skills to get the most from it
3.
Transform raw data into visual and interactive content
Oracle 11g Streams Implementer's Guide ISBN: 978-1-847199-70-6
Paperback: 352 pages
Design, implement, and maintain a distributed environment with Oracle Streams 1.
Implement Oracle Streams to manage and coordinate the resources, information, and functions of a distributed system
2.
Get to grips with in-depth explanations of the components that make up Oracle Streams, and how they work together
Please check www.PacktPub.com for information on our titles
professional expertise distilled
P U B L I S H I N G
The Oracle Universal Content Management Handbook ISBN: 978-1-849680-38-7
Paperback: 356 pages
Practical Knowledge and Breakthrough Shortcuts to Oracle UCM Expertise 1.
Build a complete Oracle UCM system from scratch and quickly learn to conigure, administer, and operate it eficiently
2.
Match and exceed savings and eficiency expectations, and avoid devastating data losses with important tips and tricks
Oracle JRockit: The Deinitive Guide ISBN: 978-1-847198-06-8
Paperback: 588 pages
Develop and manage robust Java applications with Oracle's high-performance Java Virtual Machine 1.
Learn about the fundamental building blocks of a JVM, such as code generation and memory management, and utilize this knowledge to develop code you can count on
2.
Realize the full potential of Java applications by learning how to apply advanced tuning and analysis
Please check www.PacktPub.com for information on our titles
professional expertise distilled
P U B L I S H I N G
Oracle SOA Suite 11g R1 Developer's Guide ISBN: 978-1-849680-18-9
Paperback: 720 pages
Develop Service-Oriented Architecture Solutions with the Oracle SOA Suite 1.
A hands-on, best-practice guide to using and applying the Oracle SOA Suite in the delivery of real-world SOA applications
2.
Detailed coverage of the Oracle Service Bus, BPEL PM, Rules, Human Worklow, Event Delivery Network, and Business Activity Monitoring
Oracle Business Intelligence: RAW ISBN: 978-1-849681-18-6
Paperback: 228 pages
A fast-paced introductory guide to get you up and running swiftly with the tools included in Oracle BI SE 1.
Install, conigure, and deploy the components included in Oracle Business Intelligence Suite (SE)
2.
Gain a comprehensive overview of components and features of the Oracle Business Intelligence package
Please check www.PacktPub.com for information on our titles