Noreen Redden FOCUS Users of New England 2012 FOCWizards and Focal Point Information Builders Off to See the Wizards 1.

Slides:



Advertisements
Similar presentations
Chapter 10 Excel: Data Handling or What do we do with all that data?
Advertisements

Access 2007 ® Use Databases How can Microsoft Access 2007 help you structure your database?
Copyright 2007, Information Builders. Slide 1 Dates and Functions Noreen Redden Information Builders, Inc.
1 That’s Not a Date-Time Datatype, Is It? Renee Teatro Information Builders Information Builders Summit 2006 User Conference April 2006.
Copyright © 2007, Oracle. All rights reserved Using Single-Row Functions to Customize Output Modified: October 21, 2014.
McGyver for Dynamic Subtotals/Subfoots Presented by David Smith of Brinker International.
Millennium Create Lists Claudia Conrad Product Manager, Cataloging Northwest IUG October 2003.
Exploring Microsoft Excel 2002 Chapter 7 Chapter 7 List and Data Management: Converting Data to Information By Robert T. Grauer Maryann Barber Exploring.
CVEV 118/698 Databases Lecture 2 Prof. Mounir Mabsout Elsa Sulukdjian Walid El Asmar.
Chapter 7 Data Management. Agenda Database concept Import data Input and edit data Sort data Function Filter data Create range name Calculate subtotal.
Foundation Data Workshop
1 Chapter 2 Reviewing Tables and Queries. 2 Chapter Objectives Identify the steps required to develop an Access application Specify the characteristics.
Database Design IST 7-10 Presented by Miss Egan and Miss Richards.
Pasewark & Pasewark 1 Access Lesson 6 Integrating Access Microsoft Office 2007: Introductory.
Unix Filters Text processing utilities. Filters Filter commands – Unix commands that serve dual purposes: –standalone –used with other commands and pipes.
UNIX Filters.
State of Connecticut Core-CT Project Query 4 hrs Updated 1/21/2011.
MS Access: Database Concepts Instructor: Vicki Weidler.
Advanced File Processing
Informer Web Reporting Basic Reporting
Microsoft Access Tables Birgül Kutlu Bayraktar. TERMS A database is a collection of related information. An object is a competition in the database such.
11 Chapter 2: Working with Data in a Project 2.1 Introduction to Tabular Data 2.2 Accessing Local Data 2.3 Importing Text Files 2.4 Editing Tables in the.
© 2008 The McGraw-Hill Companies, Inc. All rights reserved. ACCESS 2007 M I C R O S O F T ® THE PROFESSIONAL APPROACH S E R I E S Lesson 4 – Creating New.
Advanced Excel for Finance Professionals A self study material from South Asian Management Technologies Foundation.
Chapter 10: Working with Large Data Spreadsheet-Based Decision Support Systems Prof. Name Position (123) University Name.
Office 2003 Advanced Concepts and Techniques M i c r o s o f t Excel Project 5 Creating, Sorting, and Querying a List.
October 2003Bent Thomsen - FIT 3-21 IT – som værktøj Bent Thomsen Institut for Datalogi Aalborg Universitet.
Lesson 1: Introduction to ABAP OBJECTS Todd A. Boyle, Ph.D. St. Francis Xavier University.
Introduction to Unix (CA263) File Processing. Guide to UNIX Using Linux, Third Edition 2 Objectives Explain UNIX and Linux file processing Use basic file.
1 Data List Spreadsheets or simple databases - a different use of Spreadsheets Bent Thomsen.
Great Leads for the Savvy Sales Whiz A MINT Skills Workshop Professional Development Institute February 3, 2004.
XP Agenda Video Last Class Excel Tutorial 5: Working with Excel Lists Agenda for Next Class 1 New Perspectives on Microsoft Office Excel 2003 Tutorial.
 A database is a collection of data that is organized so that its contents can easily be accessed, managed, and updated. What is Database?
10 May Microsoft Access 2010 Relational databases’ program Part of the Microsoft Office package Administer relational database Update database through.
PIVOT TABLES AND CHARTS CS1100 Computer Science and its Applications CS1100Pivot tables and charts1.
Off To See The Wizards: The FOCWIZARDS FOCWIZARDS: Noreen Redden Art Greenhaus With help from FOCAL POINT Wizards Copyright 2011, Information Builders.
Advanced File Processing. 2 Objectives Use the pipe operator to redirect the output of one command to another command Use the grep command to search for.
Chapter Five Advanced File Processing Guide To UNIX Using Linux Fourth Edition Chapter 5 Unix (34 slides)1 CTEC 110.
Colleague, Excel & Word Best of Friends Presented by: Joan Kaun & Yvonne Nelson College of the Rockies.
 Agenda: 4/24/13 o External Data o Discuss data manipulation tools and functions o Discuss data import and linking in Excel o Sorting Data o Date and.
Chapter 6.  If a cell style will be used over and over again it can be modified in the cell styles gallery  Home ⇒ Cell Styles ⇒ right-click a style.
Indexed and Relative File Processing
May 10, 2012 Version 7 Release 7.03 Ira Kaplan WebFOCUS New Features 1.
WHAT IS A DATABASE? A DATABASE IS A COLLECTION OF DATA RELATED TO A PARTICULAR TOPIC OR PURPOSE OR TO PUT IT SIMPLY A GENERAL PURPOSE CONTAINER FOR STORING.
Access 2007 ® Use Databases How can Microsoft Access 2007 help you structure your database?
Guide to Oracle 10g ITBIS373 Database Development Lecture 4a - Chapter 4: Using SQL Queries to Insert, Update, Delete, and View Data.
ITGS Databases.
A Guide to SQL, Seventh Edition. Objectives Understand how to use functions in queries Use the UPPER and LOWER functions with character data Use the ROUND.
Advanced SELECT Queries CS 146. Review: Retrieving Data From a Single Table Syntax: Limitation: Retrieves "raw" data Note the default formats… SELECT.
Chapter Five Advanced File Processing. 2 Lesson A Selecting, Manipulating, and Formatting Information.
Copyright 2007, Information Builders. Slide 1 FOCUS Internals: Part 2 Update for 7.6.x Renee Teatro FUN Conference August 2008 Internals of Output Processing.
Copyright 2007, Information Builders. Slide 1 What's New With Dates Renee Teatro Information Builders FUN Conference October 2009.
McGraw-Hill/Irwin The Interactive Computing Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. Microsoft Excel 2002 Working with Data Lists.
DAY 21: MICROSOFT ACCESS – CHAPTER 5 MICROSOFT ACCESS – CHAPTER 6 MICROSOFT ACCESS – CHAPTER 7 Aliya Farheen October 29,2015.
Lesson 13 Databases Unit 2—Using the Computer. Computer Concepts BASICS - 22 Objectives Define the purpose and function of database software. Identify.
8 Chapter Eight Server-side Scripts. 8 Chapter Objectives Create dynamic Web pages that retrieve and display database data using Active Server Pages Process.
Corporate Customers Basic Services Intuit Financial Services University Business Financial Solutions Certification.
Tableau Server URL Parameterization and Limits. Background This short set of material covers how Tableau Server Views can be invoked via URLs while passing.
Academic Year 2015 Autumn. MODULE CC2006NI: Data Modelling and Database Systems Academic Year 2015 Autumn.
April 20, 2012 Version 7 Release 7.03 Ira Kaplan WebFOCUS New Features 1.
Chapter 10: Working with Large Data Spreadsheet-Based Decision Support Systems Prof. Name Position (123) University Name.
Copyright 2007, Information Builders. Slide 1 TABLE FILE: The Basics Noreen Redden FOCWizard June, 2008.
21 Copyright © 2009, Oracle. All rights reserved. Working with Oracle Business Intelligence Answers.
Microsoft Access Prepared by the Academic Faculty Members of IT.
SIMPLE FILTERS. CONTENTS Filters – definition To format text – pr Pick lines from the beginning – head Pick lines from the end – tail Extract characters.
A Guide to SQL, Seventh Edition
Chapter 6 Filters.
Date Functions Farrokh Alemi, Ph.D.
Computing in COBOL: The Arithmetic Verbs and Intrinsic Functions
Bent Thomsen Institut for Datalogi Aalborg Universitet
Presentation transcript:

Noreen Redden FOCUS Users of New England 2012 FOCWizards and Focal Point Information Builders Off to See the Wizards 1

Techniques – Of Course 2

Techniques 3  Customer Asked:  A Report totals sales by Product Code within Region.  We also need to get the total Sales for each Product Code, regardless of Region.  Can I do this all in One Report, and one pass through the Data?  Our Answer:  Of course, there is always the McGyver Way.  Previous Limitations of McGyver  Using a Generated Key field, means that we need different headings for the within Region report and the totals report.  In previous releases, we did this with SUBHEAD, but that required also spelling out column headings, difficult with ACROSS  Also, some of the ACROSS values may be empty for particular regions, causing yet more complications.

McGyver 4 McGyver Technique: 1. Create a file with Counters. 2. Duplicate each Sales record as many times as needed to create the different types of reports 3. Use DEFINE to specify parameters for each section. Sales Record counter Sale #1 REGION X Copy 1Copy 2 Sale #2 REGION Y Copy 1Copy 2 DEFINE SRT REGION XREGION YTOTAL

McGyver 5 TABLE FILE SYSCOLUM PRINT COMPUTE CONTROL/A1 = 'X'; TBNAME WHERE RECORDLIMIT EQ 1 ON TABLE SAVE AS FOCMCGYV END JOIN CONTROL WITH DIV IN EMPDATA TO BLANK IN FOCMCGYV AS AJ END DEFINE FILE EMPDATA CONTROL/A1 WITH DIV = 'X'; SRT/A13 = IF ORDER EQ 1 THEN AREA ELSE 'Total'; CLASS/A3 = EDIT(JOBCLASS,'999'); END 1 2 3

McGyver 6 SET HIDENULLACRS = ON TABLE FILE EMPDATA SUM SALARY ACROSS CLASS AS 'Job Class' BY ORDER NOPRINT PAGE-BREAK BY SRT NOPRINT PAGE-BREAK BY DEPT IF ORDER EQ 1 OR 2 HEADING "Salaries For Area: <SRT " WHEN ORDER EQ 1; HEADING "Salaries For All Areas " WHEN ORDER EQ 2; END

Salaries For Area: NORTH EASTERN Job Class DEPT CUSTOMER SUPPORT$62, $19, MARKETING.$139, SALES.$82, Salaries For Area: SOUTH EASTERN Job Class DEPT CONSULTING.$85, CUSTOMER SUPPORT$62, MARKETING... PERSONNEL$80, PROGRAMMING & DVLPMT..$49, McGyver 7

Salaries For All Areas Job Class DEPT ACCOUNTING $224, ADMIN SERVICES... CONSULTING.$126, CUSTOMER SUPPORT $179, MARKETING $62, PERSONNEL $125, PROGRAMMING & DVLPMT..$182, SALES$239, McGyver 8

Job Class $58, $56, $19, $508, $91, $156, McGyver 9

Techniques 10  Customer Asked: I want to combine values from multiple records into a single line (or lines) for the same key value.  Our Answer:  If the records are sorted by the key, use DEFINE followed by SUM:, if not sorted, COMPUTE with WHERE TOTAL  As it is Built key rec1comment key rec1comment rec2comment key rec1comment rec2comment rec3comment * After SUM or WHERE TOTAL key rec1comment rec2comment rec3comment

Combining 11 SET CNOTATION = EXPLICIT SET DROPBLNKLINE = ON DEFINE FILE EMPDATA CNTIT/I1 WITH PIN = 1; END TABLE FILE EMPDATA PRINT SUM.CNTIT WITHIN AREA NOPRINT COMPUTE CTR/I3 = IF AREA EQ LAST AREA THEN CTR + 1 ELSE 1; NOPRINT COMPUTE ALLEM1/A63V = IF CTR EQ 1 THEN PIN ELSE IF CTR LE 7 THEN ALLEM1 | ' ' | PIN ELSE ALLEM1; AS '' OVER COMPUTE ALLEM2/A63V= … COMPUTE FLAG/A1 = IF C2 EQ C1 THEN 'Y' ELSE 'N'; NOPRINT BY AREA NOPRINT SUBHEAD "Employees for Area <AREA " WHERE TOTAL FLAG EQ 'Y' END

Employees for AreaCENTRAL Employees for AreaCORPORATE Employees for AreaNORTH EASTERN Employees for AreaSOUTH EASTERN Employees for AreaWESTERN Combining 12

Averages  Customer Asked:  Does FOCUS give me a weighted average, or a non-weighted average?  Our Answer:  Actually Both  Types of averages  Weighted (some values participate more than others)  Non-weighted (all values participate equally) 13

Averages  Example Using ACROSS TABLE FILE EMPDATA SUM CNT.SALARY NOPRINT SALARY NOPRINT COMPUTE AVE1/D8.2M = SALARY/CNT.SALARY ; AS '' ACROSS BLANK NOPRINT ACROSS AREA BY TYPDEP/R ROWS 1 AS 'ADMIN' OVER 2 AS SLS/MARKT' OVER 3 AS 'PROGRAM' OVER 4 AS 'PROF SRVCS' ON BLANK SUMMARIZE AS 'weighted ' ON AREA SUBTOTAL AVE. AS 'average' END 14

Averages AREA CENTRAL CORPORATE NORTH EASTERN SOUTH EASTERN ADMIN $32, $56, $80, SLS/MARKT $68, $51, $44, $56, PROGRAM $45, $49, PROF SRVCS.. $40, $49, WESTERN average $31, $50, $46, $50, $54, $53, $42, $45, $45, $47, $45, $46,

16 Dates, Times, and what you can do with them

Dates  Types of Dates  Legacy format (A,I, Z, P format)  Not really a date, but a number or character string which is INTERPRETED as such  I8YYMD, P6MDY, etc.  Smart Date format  Stored as an 'offset' of days, months or year from a base date  Can change output format by a re-definition  Date-Time format  Stored as an offset from a base date  Can go down to micro-seconds (precision controls length)  All need UWS to manipulate components 17

Dates : Legacy Dates  USAGE contains Y (or YY), M, and D after format/length  2 places per letter (I8YYMD – good, I6YYMD – bad)  A sequence of digits or characters to be interpreted as a date  No validation  '123456' as 'A6YMD' displays '12/34/56' (delimiter always '/')  FORMAT date components are like EDIT options – only affect display  Only 'T' (month translate) format component even looks at data - Translates month to 3 character abbreviation  As an ACTUAL, can convert directly to a 'smart date' USAGE  Sorted as 'native format' value  For example, I6MDY displays all 'January' values first  Pre 'Y2K', where the century digits were 'assumed' to be '19'  Alpha, packed or zoned – saved on disk storage 18

Dates : Smart Dates  USAGE contains ONLY 'date' indicators, no length or data type  Internally stored as an offset from the 'base date'  January 1, 1901 was day 1  May omit day, or month and day  ALWAYS a valid date  Format controls display component order  Can be changed at will - YYMD can be changed to MDYY  Always sorted chronologically (offset sequence)  Century implicit in offset (DEFCENT and USERTHRESH)  Delimited can be '/' (default), '.' (Y.M), '-' (Y-M), ' ' (YBM), or eliminated (Y|M)  May use Q (quarter), JUL (Julian format), or W (day of week)  Can translate M with 'T', 't', 'TR' or 'tr'; W with 'R' or 'r' 19

Dates : Date – Time Dates  USAGE begins with 'H' (indicates 'Hour' format)  Stored as offset, including DATE and TIME  Time can be to milliseconds or microseconds  Storage depends of precision (8, 10 or 12 bytes)  Milliseconds = 8 bytes, Microseconds = 10 bytes  Multitude of EDIT options  Leading zero suppression/omission  AM/PM  Upper/lower case  24 hour display  Comma or blank separation  Comparable to SQL date-time formats  UWS begin with 'H' (HADD, HDIFF, etc.) 20

Dates: Useful SETs  ALLOWCVTERR – controls display of invalid date conversion  OFFgenerates a diagnostic  ONdisplays invalid date  DTSTRICT – enforces validity of date-time inputs  ONreturn 0 if invalid  OFFonly check range of values  WEEKFIRST – (1 – 7) specifies first day of the week (1=Sunday, 7=Saturday) or (ISO1 – ISO7 : 1 st week with 4 or more days)  BUSDAYS – string indicating working days (i.e. _MTWTF_)  HDAY – part of the name of a holiday file (HDAYxxxx)  Dates in YYMD format  DATEDISPLAY – display the base date as 12/31/1900 or ' ' (OFF)  DEFCENT/YRTHRESH – set first year of 100 year range (19/00)  DATEFORMAT – default order of date components (MDY) 21

Dates: Useful Functions  DT() used to set a date-time field to a value  Required for COMPUTE/DEFINE and WHERE  Not needed for IF conditions  FPRINT(infield, 'usageformat', outfield)  Converts ANY format (including date and date-time) to alpha  Replaces FTOA and PTOA  HDATE(value,'YYMD'|outfield)  Convert a date-time to date format  HDIFF(end_value, start_value,'component',outfield)  Find the number of units between 2 date-times  HGETC(length,outfield)  Get the current date-time 22

Dates: Useful Functions  HINPUT(in_length,'input_string', length,outfield)  Convert an alpha string to a date-time value  HMASK(source,'component_string', input, length,outfield)  Move multiple date-time components to a target date-time  HNAME/HPART(value,'component', outfield)  Retrieve a date-time component in alpha/numeric format  DATECVT(date,'infmt,'outfmt')  Convert a date/legacy format to date/legacy format  DATEDIF(from_date, to_date,'unit')  Finding the difference between 2 dates  DATMOV(date,'move_point')  Move a date to a significant point 23

Dates: Useful Functions  DATETRAN(indate,'(intype)','(fmt_opts)','lang',outlen,output)  Format dates in international formats  AYM/AYMD(indate,increment,outfield)  Add months or days to a legacy date  CHGDAT('infmt','outfmt', legacy_date,outfield)  Change the display of a legacy date  DOWK/DOWKL(indate,outfield)  Find the day of the week  GREGDT/JULDAT(indate,outfield)  Convert between Gregorian and Julian format 24

Dates and Dialogue Manager  Dialogue Manager only knows ALPHA strings  No format allowed  Converts 'numeric' strings to numeric when used  Routines expecting non-alpha format (date or date-time)  Pass values in as ALPHA, convert in the call to the routine  Routines produce non-alpha formats  Convert result BEORE passing back to D.M.  BAD example: -SET &FRDT = ; -SET &TODT = ; -SET &DIFF = DATEDIF(&FRDT, &TODT,'M'); -TYPE FROM &FRDT TO &TODT IS &DIFF MTHS FROM TO IS 328 MTHS 25

Dates and Dialogue Manager  BETTER example: -SET &FRDT = ; -SET &TODT = ; -SET &DIFF = DATEDIF( -DATECVT(&FRDT,'I8YYMD','YYMD'), -DATECVT(&TODT,'I8YYMD','YYMD'), - 'M'); -TYPE FROM &FRDT TO &TODT IS &DIFF MTHS FROM TO IS 12 MTHS 26

Dates and Dialogue Manager  DEFINE FUNCTION (thanks to Francis Mariani) DEFINE FUNCTION DIFF (FR/I8, TO/I8) FROM/YYMD = DATECVT(FR,'I8YYMD','YYMD'); TO/YYMD = DATECVT(TO,'I8YYMD','YYMD'); IDIFF/I2 = DATEDIF(FROM,TO,'M'); DIFF/A2 = EDIT(IDIFF); END -RUN -SET &FRDT = ; -SET &TODT = ; -SET &DIFF = DIFF(&FRDT, &TODT); -TYPE FROM &FRDT TO &TODT IS &DIFF MTHS FROM TO IS 12 MTHS 27

HDAY  Used by DATEDIF, DATEMOV, DATECVT and DATEADD  Specifies holidays  Example of HDAY file

HDAY Example: SET HDAY=IBI DEFINE FILE CAR HDATE1/HYYMDS = DT( :00:00); HDATE2/HYYMDS = DT( :00:00); DATE1/YYMD = ' '; DATE2/YYMD = ' '; DAYS/I5 = DATEDIF(DATE1,DATE2,'D'); WDAYS/I5 = DATEDIF(DATE1,DATE2,'WD'); BDAYS/I5 = DATEDIF(DATE1,DATE2,'BD'); END TABLE FILE CAR PRINT DAYS WDAYS BDAYS HDAYS WHERE COUNTRY EQ 'ENGLAND' END DAYS WDAYS BDAYS

Tips from Focal Point posts  Parameter Date Print By Warren Hinchliffe, Link Market Services Parameter Date Print  Truncating Text in the Heading of a PDF Document By Warren Hinchliffe, Link Market Services Truncating Text in the Heading of a PDF Document  Simplifying the use of Date functions in Dialogue Manager By Francis Mariani Simplifying the use of Date functions in Dialogue Manager  Open Drilldown in a New Tab By Marilyn Patchen Beyer, Minnesota Department of Education Open Drilldown in a New Tab  Dashboard HTML Page, Output Block, Multiple Selections - how to do?, By Todd Wallace, Milacron llc Dashboard HTML Page, Output Block, Multiple Selections - how to do?  Adding a Conditional Join to a Reporting Object, By Todd Wallace, Milacron llc Adding a Conditional Join to a Reporting Object  Embedded Images in Excel By Warren Hinchliffe, Link Market Services Embedded Images in Excel  For more tips and techniques, check our website 30