Na2009 enus biip_03
Upcoming SlideShare
Loading in...5
×

Like this? Share it with your network

Share
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
536
On Slideshare
536
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
16
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. Chapter 3: Configuring a BA Database in Microsoft Dynamics NAVCHAPTER 3: CONFIGURING A BA DATABASE INMICROSOFT DYNAMICS NAVObjectives The objectives are: • Provide a general overview of the Business Analytics database elements to be set up in Microsoft Dynamics® NAV. • Create and set up a new Business Analytics database. • Launch the process of configuring the created Business Analytics database on the Microsoft® SQL Server® Analysis Service side.Introduction This chapter describes how to create and set up a Business Analytics database (hereafter referred to as the BA database), on the Microsoft Dynamics NAV side before configuring the designed data on the Microsoft SQL Analysis Services side. In Chapter 2, "Business Analytics Installation and Setup" of this manual, the Configurator for SQL 2005 is run for the BA database which is already available in the demonstration database. This chapter demonstrates how to manually create new cubes, define each cube’s dimensions and measures, and set up other database components. Before explaining the configuration procedure, all the components of the BA database are described. Microsoft Official Training Materials for Microsoft Dynamics ® 3-1 Your use of this content is subject to your current services agreement
  • 2. Business Intelligence for IT Professionals in Microsoft Dynamics® NAV2009BA Database Components To create a BA database in Microsoft Dynamics NAV, you must define the database elements under the following headings in the BA Db. Overview window: • Cubes o Measures o Dimensions o Functions o Table relations • Virtual Cubes • Dimensions • Numbered Lists This section describes each of these headings. Cubes Cubes are the main objects in the online analytic processing (OLAP) technology which provides fast access to data in a data warehouse. A cube is a set of data that is usually constructed from a subset of a data warehouse and is organized and summarized into a multidimensional structure defined by a set of dimensions and measures. Every cube has a schema, which is the set of joined tables in the data warehouse the cube draws its source data from. The central table in the schema is the fact table, the source of the cubes measures. The other tables are dimension tables, the sources of the cubes dimensions. All cube elements are defined from the BA Db. Cube Card window. When defining a cube, select the tables with data you want to analyze. From those tables, select measures (quantities and amounts) you want to analyze and then select the dimensions by which to analyze the measures. Measures, meaning data to be analyzed, are categorized by dimensions. Measures – a set of values in a cube that are based on a field in the cube’s fact table. Measures are the numeric values to be processed, aggregated, and analyzed. The values can represent either amounts (cost, price, and more) or quantities (quantity invoiced, quantity remained, and more).3-2 Microsoft Official Training Materials for Microsoft Dynamics ® Your use of this content is subject to your current services agreement
  • 3. Chapter 3: Configuring a BA Database in Microsoft Dynamics NAV Dimensions – are the categories that are used to organize and filter measures for analysis. The notion of dimension in an OLAP cube is different from the notion of dimension in Microsoft Dynamics NAV. Cube dimensions are represented by table fields to categorize cube measures. Although, the standard Microsoft Dynamics NAV dimensions can also serve as cube dimensions if necessary. For example, a cube for sales analysis can include such measures as Item Sale Price and Item Cost and dimensions Store Location, Product Line, and Fiscal Year. This cube enables you to separate Item Sale Price and Item Cost into various categories by Store Location, Product Line, and Fiscal Year. Table Relations – are connections that you can build between the fact table and additional tables in a cube. It is useful to configure table relations when you need to analyze measures by additional categories not available in the fact table. Functions – are calculation operations that you can set up to allow the user to calculate amounts on the basis of measures and time dimensions. Two types of functions can be set up: • Year to Date – sums up the measure (amount or quantity) from the beginning of a year to a certain date • Balance at Date – displays the measure (amount or quantity) for a certain date. Virtual Cubes The structure of a BA database in Microsoft SQL Analysis Services allows combining several cubes into one - a virtual cube. When designing a BA database in Microsoft Dynamics NAV, you create a virtual cube and specify member cubes which will be included in it. This allows you to analyze data from both cubes simultaneously. In the virtual cube, the expressions between member cubes can be defined. By these expressions some calculation can be done and represented in the reports or analysis. Virtual cubes are created in the BA Db. Virtual Cube Card window which can be accessed by clicking F3 on a line under the Cube heading in the BA Db. Overview window. Setting up a virtual cube is similar to setting up a regular cube, except it is not necessary to stipulate values for table relations, dimensions, measures, and functions because they are already identified. Microsoft Official Training Materials for Microsoft Dynamics ® 3-3 Your use of this content is subject to your current services agreement
  • 4. Business Intelligence for IT Professionals in Microsoft Dynamics® NAV2009 Dimensions Under this heading, all dimensions defined for the database are displayed. Each cube dimension can contain a hierarchy of levels to specify the categorical breakdown available to you. The complex structure of dimensions is defined from the BA Db. Dimension Card window which can be accessed under the Dimension heading. You set up dimensions levels by selecting two or more fields in a specific order. For example, the Store Location dimension includes the level hierarchy: continent, country/region, state/province, city, store number. Each level in a dimension is of finer granularity than its parent. For example, continents contain countries/regions, and states or provinces contain cities. Similarly, the hierarchy of the Fiscal Year dimension includes the levels Year, Quarter, Month, and Day. For dates (time dimensions), the system automatically knows that periods can be broken down to year, quarter, month and day. Dimension levels are a powerful data modeling tool because they allow you to solve business analytics tasks at a high level and then expand a dimension hierarchy to reveal more details. For example, start by viewing Item Cost values of products for the past three fiscal years. Expanding the Fiscal Year dimension to the Month level, you see that item costs were especially high in the months of January and August. You can drill-down on the Store Location dimension to see if a particular region contributed significantly to the high Item Cost values, or expand into the Product Line dimension to see if item costs were high for a particular product group or product. Numbered Lists When you create cube dimensions from fields of the Option or Boolean type, the program automatically creates numbered lists for these dimensions, meaning it assigns numbers to the values of the fields. Numbered lists can be viewed under the Numbered List heading in the BA Db. Overview window. Selecting a numbered list and clicking Card, can open the BA Db. Numbered List Card window where you can view and edit the numbered lists details. The names of the numbered list values are displayed in an OLAP client as a dimension value name.Setting Up a BA Database This section demonstrates how to create a clean BA database and set up all its elements on the basis of a business intelligence scenario. Scenario: Kevin, a sales manager, wants to analyze the sales efficiency of a group of selected items. This will help him to find out which items are efficient and forecast probable purchases or price corrections. To be able to perform these business intelligence tasks, Kevin needs to calculate a gross margin.3-4 Microsoft Official Training Materials for Microsoft Dynamics ® Your use of this content is subject to your current services agreement
  • 5. Chapter 3: Configuring a BA Database in Microsoft Dynamics NAV Kevin wants to analyze the items using the following criteria: • Each customer (to analyze which of the customers brings the most profit). • Each of the time frames (posting date, quarter, year, year to date). • Each location (since the item cost in various locations can be formed differently) . • Each local currency (LCY) to analyze the domestic sales only. In addition to this analysis, Kevin needs to analyze the quantity of items remaining in stock so that he can see whether there were any unnecessary purchases of the inefficient items or whether there is a need to replenish the stock with some of the items. The additional analysis is based on the following criteria: • Each country/region (to find out where the items were purchased from). • Each posting date (to find out when the items were purchased and how many purchases were made by the end of a time period). • Location (since locations in stock might not be bound to any vendor). To perform the planned business intelligence tasks, Kevin addresses the IT Department to find out which data the cubes must be based on and whether the standard cubes are sufficient to fulfill the set tasks. The IT professionals decide the analysis will be based on the following tables: Sales Invoice Line for the first part (because this tables allows the analyst to analyze a lot of data in one place) and Item Ledger Entry for the second part (because this table contains all item purchase transactions). In the Sales Invoice Line table, the following data is required for the analysis: • Quantity (sold items) • Item cost • Item price • Amount In the Item Ledger Entry table, the following data is required for the analysis: • Quantity (purchased items) • Remaining quantity (items in stock) Microsoft Official Training Materials for Microsoft Dynamics ® 3-5 Your use of this content is subject to your current services agreement
  • 6. Business Intelligence for IT Professionals in Microsoft Dynamics® NAV2009 The IT Department decides to create a new BA database and set up new cubes due to the following reasons: • The Sales Invoice Line table is not available in the DEFAULT BA Database. • To have one common environment for analysis (virtual cube) where the sales manager can analyze data simultaneously. • To increase performance of configuration and analyses by building cubes only on the data required for the given scenario. The IT professionals need to configure the BA database in Microsoft Dynamics NAV as follows: 1. Create a blank BA database. 2. Create two cubes (one for the Sales Invoice Line table and the other – for the Item Ledger Entry table). 3. Bind the cubes with a virtual cube to compare measures from both cubes at the same time. 4. Start the Configurator for SQL 2005. NOTE: In this manual, the Configurator for SQL 2005 is used in all descriptions and demonstrations, since the Microsoft SQL Server 2005 version is being used. For Microsoft SQL Server 2008, use the Configurator for SQL 2008.3-6 Microsoft Official Training Materials for Microsoft Dynamics ® Your use of this content is subject to your current services agreement
  • 7. Chapter 3: Configuring a BA Database in Microsoft Dynamics NAV Demonstration: Creating a BA Database Before setting up the database elements, create a new blank database. The procedure of creating a new database is as follows: 1. Go to Administration > Application Setup > General > Business Analytics Setup to open the BA Db. Overview window: FIGURE 3.1 THE BA DB. OVERVIEW WINDOW 2. In the Name field, click the AssistButton to open the BA Databases window. Create a database called Trade Analysis. 3. Fill in the fields as follows: Field Value Description Code TRADING Enter the code of the new database. The maximum number of characters which can be entered is limited to 10. Name Trade Analysis Enter the name of the new database. Active Yes Select this check box to indicate that the Configurator for SQL 2005/2008 must configure this database when running it. Note that the Configurator processes the latest active database. Path to C:Program Click the AssistButton next to the field Configu FilesMicrosoft to browse to the location of the rator Dynamics Configurator.exe file. Usually the file is NAV60Configurator in the following folder: C:Program Configurator (SQL FilesMicrosoft Dynamics NAV60 2005)Configurator.exe ConfiguratorConfigurator (SQL 2005) Microsoft Official Training Materials for Microsoft Dynamics ® 3-7 Your use of this content is subject to your current services agreement
  • 8. Business Intelligence for IT Professionals in Microsoft Dynamics® NAV2009 FIGURE 3.2 THE BA DATABASES WINDOW 4. Close the BA Databases window. The following screenshot shows a new empty database: FIGURE 3.3 AN EMPTY BA DATABASE Demonstration: Setting Up Cubes When the blank database is created, set up the database elements. The setup procedure always starts with creating and setting up cubes. To set up the two cubes required for the scenario, use the following steps: 1. In the BA Db. Overview window, select the Cube heading and press F3 to create a new cube. Click Yes on the confirmation message that appears.3-8 Microsoft Official Training Materials for Microsoft Dynamics ® Your use of this content is subject to your current services agreement
  • 9. Chapter 3: Configuring a BA Database in Microsoft Dynamics NAV The BA Db. Cube Card window is opened. 2. Click the AssistButton next to the Fact Table No. field to open the Objects window. 3. Select the fact table for the cube (in this case, it is Table 113 Sales Invoice Line) and click OK. FIGURE 3.4 THE BA DB. CUBE CARD WINDOW Now define measures which represent the information required for analysis. In this scenario, it is quantity, item cost, item price, and amount. 4. In the BA Db. Cube Card window, click Cube > Measures. 5. In the BA Db. Cube Measures window, click Select Fields to open the BA Field Selection window. Specify the necessary sales invoice line fields to add them to the cube as measures. 6. Select the Selected field on the lines with the No. field set to: 15, 22, 23, and 29. FIGURE 3.5 DEFINING MEASURES FOR THE CUBE Microsoft Official Training Materials for Microsoft Dynamics ® 3-9 Your use of this content is subject to your current services agreement
  • 10. Business Intelligence for IT Professionals in Microsoft Dynamics® NAV2009 NOTE: Select more fields that will serve as measures in the cube if it is required for your business intelligence task. 7. Click OK. The BA Db. Cube Measures window is filled in with the information about the fields selected to serve as measures for the cube. FIGURE 3.6 DEFINED CUBE MEASURES NOTE: The measures can be specified in the BA Db. Cube Measures window manually. You can also specify additional parameters of the measures by filling in the following fields: Field Description Aggregation Specify the type of field value that will be displayed in an OLAP client by selecting one of the following options: Sum – A sum of values for this field will be displayed. Min – The minimum value will be displayed. Max – The maximum value will be displayed. Count – A sum of records with this field will be displayed. Expression In this field, add calculation formulas that will determine the field value the measure needs to display. Click the AssistButton next to the field to select the formula elements. Display In this field, specify the way the measure will be displayed in Format a Microsoft® Office Excel® cell. Enter an Excel format string or leave the field empty for the measure to be displayed in the Microsoft Dynamics NAV format.3-10 Microsoft Official Training Materials for Microsoft Dynamics ® Your use of this content is subject to your current services agreement
  • 11. Chapter 3: Configuring a BA Database in Microsoft Dynamics NAV To filter and manipulate with the data represented by measures, set up dimensions for the cube. The following fields from the Sales Invoice Line table will serve as dimensions for the given scenario: • Sell-to Customer No. (To analyze sales invoice line data by customers.) • Sales Invoice Line Type (To analyze the sales invoice line data only of the Item type.) • Sales Invoice Line No. (To analyze sales invoice line data by items.) NOTE: The Sales Invoice Line No. dimension will represent items only after the Sales Invoice Line Type dimension is set to Item by setting a filter in the Filter field in the BA Db. Cube Dimensions window or in the OLAP client. • Location Code (To analyze sales invoice line data by location.) • Posting Date (To analyze sales invoice line data by posting date.) To create dimensions, perform the following steps: 8. Click Cube > Dimensions to open the BA Db. Cube Dimensions window. 9. Click Functions > Select Fields to open the BA Field Selection window. NOTE: The standard Microsoft Dynamics NAV dimensions can also be selected to serve as cube dimensions by clicking Functions > Select Dimensions. 10. Select the Selected field on the lines with No. set to: 2, 5, 6, 7, and 131. NOTE: For each field of the Option or Boolean type that is selected to add as a dimension, a numbered list is created automatically and added to the Numbered List heading in the BA Db. Overview window. Microsoft Official Training Materials for Microsoft Dynamics ® 3-11 Your use of this content is subject to your current services agreement
  • 12. Business Intelligence for IT Professionals in Microsoft Dynamics® NAV2009 11. Click OK to view all the selected dimensions in the BA Db. Cube Dimensions window. FIGURE 3.7 THE BA DB. CUBE DIMENSIONS WINDOW The window is filled in with information about the fields which will serve as cube dimensions. Field Description Table No. This field contains the number of the table from which the field, selected to be a cube dimension, is retrieved. Table Name This field contains the name of the table from which the field, selected to be a cube dimension, is retrieved. Field No. This field contains the number of the field selected to be a cube dimension. Field Name This field contains the name of the field selected to be a cube dimension. BA Db. This field contains the number of the line on which the field Dimension selected to be a cube dimension is located. Line BA Db. This field contains the name of the dimension suggested by the Dimension program. This dimension name will be displayed in an OLAP Name client. Modify the name if necessary. Dimension This field contains the code of the dimension. This field is filled Code in only if the field selected to be a cube dimension is a standard Microsoft Dynamics NAV dimension. Dimension This field contains the name of the dimension. This field is Name filled in only if the field selected to be a cube dimension is a standard Microsoft Dynamics NAV dimension.3-12 Microsoft Official Training Materials for Microsoft Dynamics ® Your use of this content is subject to your current services agreement
  • 13. Chapter 3: Configuring a BA Database in Microsoft Dynamics NAV Field Description Dimension This field contains the number of the table from which the Entry Table standard Microsoft Dynamics NAV dimension, selected to be a No. cube dimension, is retrieved. This field is filled in only if the field selected to be a cube dimension is a standard Microsoft Dynamics NAV dimension. Dimension This field contains the name of the table from which the Entry Table standard Microsoft Dynamics NAV dimension, selected to be a Name cube dimension, is retrieved. This field is filled in only if the field selected to be a cube dimension is a standard Microsoft Dynamics NAV dimension. Name This field contains the name of the dimension. The program replaces all symbols that the Configurator for SQL 2005 or 2008 cannot identify with the underscore. This is necessary for the proper work of the Configurator. Filter In this field, if necessary set a filter on the data included into the given dimension. If this field is filled in, an OLAP client will display data only by the set filter. The filter can be defined with the following syntax: • A range: 1000..2000 • A specific value: 1000 • Or (a set of specific values): 1000|2000 • Not equal to a specific value: <>1000 • Date values must be specified according to the following format: ddmmyyyy To filter a dimension’s numbered list, enter the numbered list’s value in the Filter field. Find the numbered list’s value in the Value field in the BA Db. Numbered List Card window. Setting a filter can be useful to prevent historical data from being copied to the Microsoft SQL Analysis Services. 12. For the Sales Invoice Line Type dimension, enter “2” to set a filter by items. This is necessary to have the Sales Invoice Line No. dimension represented by items. NOTE: The filter “2” is taken from the dimension’s numbered list since this dimension is created from a field of the Option type and the Item option corresponds to value 2 in the numbered list. 13. Close the BA Db. Cube Dimensions window. Microsoft Official Training Materials for Microsoft Dynamics ® 3-13 Your use of this content is subject to your current services agreement
  • 14. Business Intelligence for IT Professionals in Microsoft Dynamics® NAV2009 To filter the sales invoice lines by the currency the transactions are made in, the Currency Code dimension is needed. This dimension is based on the Currency Code field. This field is not included in the fact table (Sales Invoice Line); it is in the Sales Invoice Header table. To use this field, bind the two tables through the cube table relations. NOTE: When a table relation is being built, bind the whole table to the fact table rather than the field that is needed. 14. In the BA Db. Cube Card window, click Cube > Related Tables to open the BA Db. Cube Table Relations window. Use the BA Db. Cube Table Relations window to view the tables that will be included in a BA cube, in addition to the primary fact table. Each line in the window contains information about one related table. 15. Click Select Fields to open the BA Field Selection window. 16. Select the Selected field on the line for the field that is available on both tables to be bound (in this case, it is Document No., which is present in both Sales Invoice Line and Sales Invoice Header tables) and click OK. Selecting the Document No. field makes it possible to bind the two tables and consequently have access to the Currency Code field which will serve as another cube dimension. FIGURE 3.8 CUBE TABLE RELATIONS3-14 Microsoft Official Training Materials for Microsoft Dynamics ® Your use of this content is subject to your current services agreement
  • 15. Chapter 3: Configuring a BA Database in Microsoft Dynamics NAV The BA Db. Cube Table Relations window specifies the tables that will be included in a BA cube, in addition to the primary fact table. The fields in this window display the following information about related table(s): Field Description Relates-from This field contains the number of the fact table. Table No. Relates-from This field contains the name of the fact table. Table Name Relates-from This field contains the number of the fact table field Field No. through which the table relation is built. Relates-from This field contains the name of the fact table field through Field Name which the table relation is built. Relates-to Table This field contains the number of the table which is bound No. to the fact table. Relates-to Table This field contains the name of the table which is bound to Name the fact table. 17. Close the BA Db. Cube Table Relations window. Now the Sales Invoice Line fact table and Sales Invoice Header table are related. Select the Currency Code field as a cube dimension. 18. Click Cube > Dimensions to open the BA Db. Cube Dimensions window. 19. Click Function > Select Fields. 20. Select the Selected field on the line with the No. field set to 32. 21. Click OK. 22. Close the BA Db. Cube Dimensions window. Now, all the necessary cube dimensions are defined for this scenario. To analyze the sales amount by year to date, create a cube function that will sum up sales amounts from the beginning of a year to a certain date (Year to Date). Microsoft Official Training Materials for Microsoft Dynamics ® 3-15 Your use of this content is subject to your current services agreement
  • 16. Business Intelligence for IT Professionals in Microsoft Dynamics® NAV2009 23. Click Cube > Functions in the BA Db. Cube Card window to open the BA Db. Cube Functions window. 24. Create a new line filling the fields as follows: Field Value Description Name Amount Enter the name of the function. Year to Date Type Year to Click the AssistButton next the field to select one of Date the following options: • Year to Date – The function sums up the measure (amount or quantity) from the beginning of a year to a certain date. • Balance at Date - The function displays the measure (amount or quantity) for a certain date. Measure 30000 Click the AssistButton next to the field to select a Line No. measure the function will process. After the measure is selected, the program fills in this field automatically with the number of the measure line in the BA Db. Cube Measure table. Measure Amount Contains the name of the measure the function will Name process. The program fills in this field automatically when the Measure Line No. field is filled in. Time 50000 Click the AssistButton next to the field to select a Dimension dimension the function will process. After the Line No. dimension is selected, the program fills in this field automatically with the number of the dimension line in the BA Db. Cube Dimension table. Note: Only the dimensions of the Time type can be selected. Time Posting Contains the name of the dimension the function will Dimension Date process. The program fills in this field automatically Name when the Time Dimension Line No. field is filled in. Display Use this field to specify the way the calculation result Format will be displayed in a Microsoft Office Excel cell. Enter an Excel format string or leave the field empty for the result to be displayed in the Microsoft Dynamics NAV format.3-16 Microsoft Official Training Materials for Microsoft Dynamics ® Your use of this content is subject to your current services agreement
  • 17. Chapter 3: Configuring a BA Database in Microsoft Dynamics NAV FIGURE 3.9 DEFINED CUBE FUNCTION 25. Close the BA Db. Cube Functions and BA Db. Cube Card windows to return to the BA Db. Overview window. According to the scenario, create the second cube for the analysis. The fact table will be the Item Ledger Entry which will have a table relation to the Country/Region table that will perform the analysis for each country/region. The measures for the second cube are as follows: • Quantity (The quantity of purchased items.) • Remaining Quantity (Items currently remaining in stock.) Dimensions from the fact table will be the following: • Item No. (To analyze purchases for each of the items.) • Posting Date (To analyze item ledger entry data for each of the dates when item purchases were posted.) • Entry Type (To filter items for each of the purchases and remaining quantities.) • Location Code (To analyze item ledger entry data for each location.) Dimensions from the Country /Region table will be: • Code (To analyze item ledger entry data for each of the geographical locations.) • Name (To analyze item ledger entry data for each of the geographical locations.) To analyze the total purchase for items by period, create a cube function based on the Quantity measure and Posting Date dimension. To create the second cube, use the following procedure: 1. In the BA Db. Overview window, select the Cube heading and press F3 to create a new cube and click Yes on the confirmation message that appears. Microsoft Official Training Materials for Microsoft Dynamics ® 3-17 Your use of this content is subject to your current services agreement
  • 18. Business Intelligence for IT Professionals in Microsoft Dynamics® NAV2009 2. In the BA Db. Cube Card window that appears, click the AssistButton next to the Fact Table No. field to open the Objects window. 3. Select the table with ID 32 and click OK. 4. In the BA Db. Cube Card window, click Cube > Related Tables to open the BA Db. Cube Table Relations window. 5. Click Select Fields to open the BA Field Selection window. 6. Select the Selected field on the line for the Country/Region Code field. 7. Click OK and close the BA Db. Cube Table Relations window to return to the BA Db. Cube Card window. 8. Click Cube > Measures to open the BA Db. Cube Measures window. 9. Click Select Fields to open the BA Field Selection window. 10. Select the Selected field on the lines with the No. field set to 12 and 13. 11. Click OK and close the BA Db. Cube Measures window to return to the BA Db. Cube Card window. 12. Click Cube > Dimensions to open the BA Db. Cube Dimensions window. 13. Click Functions > Select Fields to open the BA Field Selection window. 14. Select the Selected field on the lines with the Table Name field set to Item Ledger Entry and the No. field set to 2, 3, 4, and 8. 15. Select the Selected field on the lines with the Table Name field set to Country/Region and the No. field set to 1 and 2. 16. Click OK and close the BA Db. Cube Dimensions window. 17. Click Cube > Functions in the BA Db. Cube Card window to open the BA Db. Cube Functions window. 18. Create a new line filling in the fields as follows: Field Value Name Quantity Year to Date Type Year to Date Measure Line No. 10000 Measure Name Quantity Time Dimension Line No. 40000 Time Dimension Name Posting Date3-18 Microsoft Official Training Materials for Microsoft Dynamics ® Your use of this content is subject to your current services agreement
  • 19. Chapter 3: Configuring a BA Database in Microsoft Dynamics NAV 19. Close the BA Db. Cube Functions and BA Db. Cube Card windows to return to the BA Db. Overview window. 20. Expand the Cube heading to view all the created cubes. 21. Expand Table relations, Measures, Functions and Dimensions to view the details about the cube members. Demonstration: Creating a Virtual Cube Now that two cubes required for the scenario are configured, create a virtual cube to manipulate the data from both cubes at the same time. To create a virtual cube, use the following procedure: 1. In the BA Db. Overview window, select the Virtual Cube heading and click Functions > New. Click Yes on the confirmation window that appears. 2. In the BA Db. Virtual Cube Card window, fill in the fields as follows: Field Value Description Name Liquidity Enter the name of the virtual cube. Cube Line Line 1: Click the AssistButton next to the field to select No. 10000 the cube to add to the virtual cube. Each line in the BA Db. Virtual Cube Card window Line 2: represents one cube. 20000 Cube Line 1: The field contains the name of the cube added to Name Sales Invoice the virtual cube. This field is filled in Line automatically when the Cube Line No. field is filled in. Line 2: Item Ledger Entry Microsoft Official Training Materials for Microsoft Dynamics ® 3-19 Your use of this content is subject to your current services agreement
  • 20. Business Intelligence for IT Professionals in Microsoft Dynamics® NAV2009 FIGURE 3.10 THE BA DB. VIRTUAL CUBE CARD WINDOW To view the gross margin for item sales, define calculations in the virtual cube by setting up expressions as follows: 3. Click Expressions to open the BA Db. Virtual Cube Calcs. window. 4. Fill in the fields as follows: Field Value Description Name Gross Margin Enter the name of the expression. Expression [Sales Invoice Click the AssistButton next to the Line].[Amount]-[Sales field to select measures which Invoice will serve as formula elements. Line].[Quantity]*[Sales Use the following operators: +, -, Invoice Line].[Unit Cost * and /. Use parentheses to group _LCY_] statements. Display In this field, you can specify the Format way the calculation result will be displayed in a Microsoft Office Excel cell. Enter an Excel format string or leave the field empty if you want the result to be displayed in the Microsoft Dynamics NAV format.3-20 Microsoft Official Training Materials for Microsoft Dynamics ® Your use of this content is subject to your current services agreement
  • 21. Chapter 3: Configuring a BA Database in Microsoft Dynamics NAV FIGURE 3.11 THE BA DB. VIRTUAL CUBE CALCS. WINDOW 5. Close the BA Db. Virtual Cube Calcs. and BA Db. Virtual Cube Card windows. Dimension Card After the cube dimensions are defined under the Cube heading in the BA Db. Overview window, set up a complex structure of the dimensions from the BA Db. Dimension Card window. To open the window, expand the Dimension heading, select a dimension, and click Card. FIGURE 3.12 THE BA DB. DIMENSION CARD WINDOW If necessary, create new dimensions from this window by pressing F3. Microsoft Official Training Materials for Microsoft Dynamics ® 3-21 Your use of this content is subject to your current services agreement
  • 22. Business Intelligence for IT Professionals in Microsoft Dynamics® NAV2009 The BA Db. Dimension Card window contains the following fields: Field Description Name Enter the name of the dimension. If viewing a dimension created from the Cube heading, the value in this field is automatically retrieved from the BA Db. Dimension Name field in the BA Db. Cube Dimensions window. Type Click the AssistButton next to the field to select the dimension type. Cube dimension can be of the following two types: • Standard – Indicates that the field the cube dimension is created from is of the type other than Date or Time. This option also can indicate that the cube dimension is created from a standard Microsoft Dynamics NAV dimension. • Time – Indicates that the field the cube dimension is created from is of the Date or Time type. Standard Click the AssistButton next to the field to select the subtype of Type the dimension. Specify the value in this field only if the Type field is set to Standard. Select one of the following options: • Table – Indicates that the dimension value is retrieved from a table • Numbered List – Indicates the source field for this cube dimension is of the Option or Boolean type and the dimension value is retrieved from a numbered list. • Dimension - Indicates the cube dimension is created from the standard Microsoft Dynamics NAV dimension and the cube dimension value is retrieved from that standard dimension. Table No. Click the AssistButton next to the field to select a table from which the dimension value is retrieved. This field must be filled in only if the Standard Type field is set to Table. If viewing a dimension created from the Cube heading, the value in this field is filled in automatically. Field Click the AssistButton next to the field to select the field(s) Numbers from which the dimension value is retrieved. If more than one field is selected, an OLAP client will display several values side by side. Numbered Click the AssistButton next to the field to select a numbered list List Line from which the dimension value is retrieved. This field must be No. filled in only if the Standard Type field is set to Numbered List. If viewing a dimension created from the Cube heading, the value in this field is filled in automatically.3-22 Microsoft Official Training Materials for Microsoft Dynamics ® Your use of this content is subject to your current services agreement
  • 23. Chapter 3: Configuring a BA Database in Microsoft Dynamics NAV Field Description Dimension Click the AssistButton next to the field to select the code of a Code standard Microsoft Dynamics NAV dimension from which the dimension value is retrieved. This field must be filled in only if the Standard Type field is set to Dimension. If viewing a dimension created from the Cube heading, the value in this field is filled in automatically. To set up a complex dimension structure, do the following: • Define a related table. To include more dimensions in a BA cube and relate them to the primary ones, click Dimension > Related Tables. • Define dimension levels. To set up a multilevel structure of a dimension, click Dimension > Levels. Numbered List Card If the created dimensions are based on the fields of the Boolean or Option type, the program automatically sets up a numbered list for the dimension and assigns numbers to the options. Numbered lists are grouped under the Numbered List heading in the BA Db. Overview window. Expand the Numbered List heading, select a numbered list, and click Card to open the BA Db. Numbered List Card window. FIGURE 3.13 THE BA DB. NUMBERED LIST CARD WINDOW Microsoft Official Training Materials for Microsoft Dynamics ® 3-23 Your use of this content is subject to your current services agreement
  • 24. Business Intelligence for IT Professionals in Microsoft Dynamics® NAV2009 Use this window to view or edit information about a numbered list and to create a new numbered list. The window contains the following fields: Field Description Name This field contains the name of the numbered list suggested by the program. Edit the name if necessary. Type The field contains the type of object the numbered list is based on. Select one of the two options: Field – This option indicates that the numbered list values are retrieved from a field. Custom – Select this option to create a numbered list which is not based on any field. Table No. This field contains the number of the table which contains the source field for the given numbered list. Click the AssistButton next to the field to select a table. Field No. This field contains the number of the source field for the given numbered list. Click the AssistButton next to the field to select a field number. Value The field contains the number which corresponds to a value in the source field for the given numbered list. When a new numbered list is created, numbers must be assigned to the values. Name This field contains the name of the value represented by a number in the Value field. This name will be displayed in an OLAP client as a dimension value name. Rename the value to have a different dimension value name display. NOTE: If a numbered list line is deleted, the corresponding value name will not be displayed in an OLAP client.3-24 Microsoft Official Training Materials for Microsoft Dynamics ® Your use of this content is subject to your current services agreement
  • 25. Chapter 3: Configuring a BA Database in Microsoft Dynamics NAV After the BA database is set up, view the database elements in the BA Db. Overview window where all the cubes, virtual cubes, dimensions, and numbered lists are grouped under the corresponding headings. Any of the headings can be expanded to view the members of that heading. For example, expand the Cube heading to view the list of all the cubes specified in the configuration. Expand any of the cubes in the list to view the details of the cube, such as table relations, measures, functions, and dimensions. Similarly, expand the Virtual Cube heading to view the list of all the virtual cubes configured. FIGURE 3.14 THE CONFIGURED BA DATABASE Starting the Configurator The BA database is configured on the Microsoft Dynamics NAV side. Start the Configurator for SQL 2005 or SQL 2008 to configure the database on the SQL Server Analysis Services side. 1. In the BA Db. Overview window, click the AssistButton next to the Name field to open the BA Databases window. 2. Select the Trade Analysis database and click BA Datab. > Companies to select which companies will be included into the database. Each company included will serve as another dimension. 3. Select the Selected field next to the CRONUS International Ltd. Company. Microsoft Official Training Materials for Microsoft Dynamics ® 3-25 Your use of this content is subject to your current services agreement
  • 26. Business Intelligence for IT Professionals in Microsoft Dynamics® NAV2009 NOTE: At least one company must be selected. In this demonstration, only one company is used, but typical business intelligence analyses include several companies. 4. Click Functions > Update XML to transfer the BA database structure to an XML file or update the file if it already exists. This file is used by the Configurator to configure the BA database on the Microsoft SQL Analysis Services side. 5. Click BA Datab. > View XML to preview the created/updated XML file. NOTE: Before starting the Configurator, if necessary, make a schedule to automatically run the Configurator at a specified time every day. Select the line with the necessary database and click BA Datab. > Schedules to open the BA Db. Schedules window and set up the schedule. 6. To start the Configurator manually, click Functions > Start Configurator. 7. After the Configurator has verified the requirements, click Next to continue the configuration process. 8. Click Close when the configuration process is complete. After the Configurator finishes the configuration process, Kevin can use any of the OLAP clients to perform his analysis. Later on in this manual it shows how to use the following OLAP clients to carry out Kevin’s business intelligence tasks: • Microsoft SQL Server Management Studio • Microsoft SQL Server Business Intelligence Development Studio • Business Analytics for Microsoft Dynamics NAV • Microsoft Office Excel3-26 Microsoft Official Training Materials for Microsoft Dynamics ® Your use of this content is subject to your current services agreement
  • 27. Chapter 3: Configuring a BA Database in Microsoft Dynamics NAVSummary Prior to starting the Configurator for SQL 2005 or SQL 2008, which automatically configures a BA database in Microsoft SQL Analysis Service, the database must be configured on the Microsoft Dynamics NAV side. The configuration process consists of setting up the following major database elements: • Cubes – the core BA database elements, which contain measures (data for analysis), dimensions (criteria that categorize measures), table relations (connection between the fact table and additional tables), and functions (calculation of amounts based on measures and time dimensions). • Virtual cubes – cubes aimed at combining two or more cubes into one. • Numbered lists – values of the fields of the Option or Boolean type to which numbers are assigned. The program automatically gathers such values under a separate heading when a cube dimension is created from an Option or Boolean field. Microsoft Official Training Materials for Microsoft Dynamics ® 3-27 Your use of this content is subject to your current services agreement
  • 28. Business Intelligence for IT Professionals in Microsoft Dynamics® NAV2009Test Your Knowledge 1. Which of the following components of a cube represents data to be analyzed in a business intelligence application? ( ) Dimension ( ) Measure ( ) Table relation ( ) Function 2. Which BA database element is used to combine several cubes into one cube? 3. Which of the following steps in configuring a BA database will be the first one? ( ) Defining measures ( ) Defining dimensions ( ) Creating a cube ( ) Creating a virtual cube 4. Which of the following types of cube functions can be configured? (Select all that apply) ( ) Year to Date ( ) Total per Year ( ) Balance at Date ( ) Total at Date3-28 Microsoft Official Training Materials for Microsoft Dynamics ® Your use of this content is subject to your current services agreement
  • 29. Chapter 3: Configuring a BA Database in Microsoft Dynamics NAVLab 3.1 - Configuring a BA Database In this lab, you will practice configuring a BA database in Microsoft Dynamics NAV. You can add new database elements to the Trade Analysis database created in the Setting Up a BA Database section of this chapter. Scenario Kevin, a sales manager, wants to analyze the liquid ratio by measuring the liquidity and ability of his company to meet its obligations. Kevin needs this information to see whether the accounts receivable can cover accounts payable. The requirements for the analysis are as follows: • The analysis must be both global and for each general business posting group (domestic and foreign). • It must be possible to view receivables and payables for the end of a time period. • Kevin must be able to see the tendency of the company liquidity. • The following tables must be included in the BA database configuration: Detailed Cust. Ledg. Entry, Detailed Vendor Ledg. Entry, Customer, and Vendor. • The following fields must be included in the BA database configuration: Posting Date, Amount (LCY), Debit Amount (LCY), Credit Amount (LCY), Entry Type, Customer No., Vendor No., and Gen. Bus. Posting Group. Kevin’s task is to configure the BA database in Microsoft Dynamics NAV and launch the configuration process in Microsoft SQL Analysis Services. Challenge Yourself! 1. Create the necessary number of cubes. 2. Define measures, dimensions, and table relations for the cubes. 3. Create a virtual cube to combine the created cubes. 4. Start the Configurator. Need a Little Help? 1. Create two cubes: one for the Detailed Cust. Ledg. Entry table and the other for the Detailed Vendor Ledg. Entry table. 2. Define the following measures (the same for both cubes): Amount (LCY), Debit Amount (LCY), Credit Amount (LCY). Microsoft Official Training Materials for Microsoft Dynamics ® 3-29 Your use of this content is subject to your current services agreement
  • 30. Business Intelligence for IT Professionals in Microsoft Dynamics® NAV2009 3. Create the following table relations: o Between the Detailed Cust. Ledg. Entry table and the Customer table through the Customer No. field. o Between the Detailed Vendor Ledg. Entry table and the Vendor table through the Vendor No. field. 4. Define the following dimensions for the first cube (Detailed Cust. Ledg. Entry): Posting Date, Customer No., Entry Type, Gen. Bus. Posting Group. 5. Define the following dimensions for the second cube (Detailed Vendor Ledg. Entry): Posting Date, Vendor No., Entry Type, Gen. Bus. Posting Group. 6. Create a virtual cube to combine the Detailed Cust. Ledg. Entry and Detailed Vendor Ledg. Entry cubes. 7. Update the XML file. 8. Start the Configurator for SQL 2005 or SQL 2008 in the BA Databases window. Step by Step Creating Cubes 1. Go to Administration > Application Setup > General > Business Analytics Setup. 2. In the BA Db. Overview window, expand the Cube heading and press F3. 3. Click Yes on the confirmation message that appears. 4. Click the AssistButton next to the Fact Table No. field to open the Objects window. 5. Select the table with ID 379 and click OK. 6. In the BA Db. Cube Card window, click Cube > Measures. 7. Click Select Fields. 8. Select the Selected field on the lines with the No. field set to: 8, 18, and 19. 9. Click OK. 10. Close the BA Db. Cube Measures window. 11. Click Cube > Related Tables. 12. In the BA Db. Cube Table Relations window, fill in the fields as follows: Field Value Relates-from Table No. 379 Relates-from Table Name Detailed Cust. Ledg. Entry3-30 Microsoft Official Training Materials for Microsoft Dynamics ® Your use of this content is subject to your current services agreement
  • 31. Chapter 3: Configuring a BA Database in Microsoft Dynamics NAV Field Value Relates-from Field No. 9 Relates-from Field Name Customer No. Relates-to Table No. 18 Relates-to Table Name Customer 13. Close the BA Db. Cube Table Relations window. 14. Click Cube > Dimensions. 15. Click Functions > Select Fields. 16. Select the Selected field on the lines with the No. field set to: 3, 4, and 9 for the Detailed Cust. Ledg. Entry table, and 88 for the Customer table. 17. Click OK. 18. Close the BA Db. Cube Dimensions window. NOTE: Since there are cube dimensions, measures, and numbered lists already created during the Setting Up Cubes demonstration for the same BA database, it may be necessary to rename some of the measures, dimensions, and/or numbered lists to avoid repeating of the same names. If there are cube measures, dimensions, or numbered lists with the same names, Microsoft Dynamics NAV does not allow the XML file to be updated. 19. Repeat steps 2-18 to create the second cube specifying the following parameters: o ID of the fact table: 380 o Relates-from Table 380 o Relates-from Field No. 9 o Relates-to Table No. 23 Creating a Virtual Cube 1. In the BA Db. Overview window, expand the Virtual Cube heading, and press F3. 2. In the BA Db. Virtual Cube Card window in the Name field, enter the name of the virtual cube, for example “Liquidity.” 3. On the lines, fill in the fields as follows: Line Field Value 1 Line No. 30000 1 Cube Name Detailed Cust_ Ledg_ Entry 2 Line No. 4000 2 Cube Name Detailed Vendor Ledg_ Entry Microsoft Official Training Materials for Microsoft Dynamics ® 3-31 Your use of this content is subject to your current services agreement
  • 32. Business Intelligence for IT Professionals in Microsoft Dynamics® NAV2009 NOTE: The number in the Line No. field may vary depending on how many cubes the database currently has. 4. Close the BA Db. Virtual Cube Card window. Starting the Configurator for SQL 2005 1. In the BA Db. Overview window, click the AssistButton next to the Name field. 2. Select the Active field next to the database where the cubes are created. 3. Click Functions > Update XML. 4. Click Functions > Start Configurator.3-32 Microsoft Official Training Materials for Microsoft Dynamics ® Your use of this content is subject to your current services agreement
  • 33. Chapter 3: Configuring a BA Database in Microsoft Dynamics NAVQuick Interaction: Lessons Learned Take a moment and write down three Key Points you have learned from this chapter 1. 2. 3. Microsoft Official Training Materials for Microsoft Dynamics ® 3-33 Your use of this content is subject to your current services agreement
  • 34. Business Intelligence for IT Professionals in Microsoft Dynamics® NAV2009Solutions Test Your Knowledge 1. Which of the following components of a cube represents data to be analyzed in a business intelligence application? ( ) Dimension (•) Measure ( ) Table relation ( ) Function 2. Which BA database element is used to combine several cubes into one cube? MODEL ANSWER: Virtual cube 3. Which of the following steps in configuring a BA database will be the first one? ( ) Defining measures ( ) Defining dimensions (•) Creating a cube ( ) Creating a virtual cube 4. Which of the following types of cube functions can be configured? (Select all that apply) (√) Year to Date ( ) Total per Year (√) Balance at Date ( ) Total at Date3-34 Microsoft Official Training Materials for Microsoft Dynamics ® Your use of this content is subject to your current services agreement