Business Intelligence in Microsoft Dynamics AX 5.0 Demo Overview 1. Introduction Reporting is an essential part of everyday work in any company. When the company works for a long time and grows up, the transactional database that report data is taken from grows as well. As a result, report processing for this database takes more and more time. To prevent wasting time, the company can use OLAP technology for data aggregation and analysis. Microsoft Dynamics AX 5.0 has been integrated with SQL Server Business Intelligence Development Framework to provide an opportunity to build OLAP cubes on the basis of Microsoft Dynamics AX business data. 2. Audiences The audience for this demo can be anyone needing to use Microsoft Dynamics AX 5.0 integration with SQL Server BI Development Framework. These can be customers’ or partners’ developers and advanced users. 3. Scenario Personas Tim Jones – Director of Sales Kate Light – Developer Story Tim and his team often need information about sales per customer. For this purpose, they usually use a report designed in Microsoft Dynamics AX. However, processing of this report takes too long and Tim needs to receive information on-the-fly. He consulted Kate Light, the company developer, and she suggested designing the OLAP cube to analyze sales per customer in a more efficient way. 4. Purpose of Demo The demo shows: How to set up perspectives for creating BI Projects. How to set up SQL Analysis Services integration for Microsoft Dynamics AX 5.0. How to use the SQL Server Business Intelligence Development Framework. 5. Setup/Prerequisites 1 This demo requires the following preliminary settings: Visual Studio .NET 2005 must be installed. SQL Analysis Services with SQL Server Business Intelligence Development Framework must be installed and configured. 2 Demo Presenter’s Discussion Points Actions Taken First of all, Kate starts Microsoft Dynamics AX. Click Start > All Programs > Microsoft Dynamics AX. She creates the new perspective that the future OLAP cube will be based on. Therefore, this step is the most important one. To create a new perspective, Kate opens the AOT, navigates to the Perspectives node, right-clicks it, and selects New Perspective. She names the perspective DemoCustCube. Open the AOT (press CTRL+D). Expand the Data Dictionary node. Right-click the Perspectives node. In the shortcut menu, select New Perspective. Rename the newly created perspective as DemoCustCube. After that, Kate sets up the perspective’s properties. She inserts the Accounts receivable label into the Label field, and sets Usage to OLAP, indicating that this perspective will be used for building OLAP cubes. Open the perspective properties by pressing ALT + ENTER. In the Label field, select label with the Accounts receivable text. Set Usage = OLAP. 3 Next, Kate adds tables to the perspective. Expand the DemoCustCube perspective node. Select the Tables node. Open the second copy of the AOT by pressing CTRL+D. Expand the Data Dictionary node. Expand the Tables node. Select the following tables: AddressCounty, AddressState, CustGroup, CustTable, InventItemGroup, InventTable, CustInvoiceJour, CustInvoiceTrans. Drag the selected tables to the Tables node of DemoCustCube. Then Kate sets up the tables parameters in perspectives: isLookup – determines whether analysis attributes will be rolled up into the parent dimension AnalysisIdentifier – determines the table field that will be used as the dimension instance identifier. This field is also referenced as an attribute in derived hierarchies Select the AddressCounty table. Open the properties palette by pressing ALT+ENTER. Set the IsLookup property to Yes. For the AnalysisIdentifier property, select the Name field. Perform the following setup for other tables: For the AddressState table, set IsLookup = Yes, AnalysisIdentifier = Name 4 Next, Kate determines the table fields that will be attributes and measures and defines the aggregation function for measures. Also, she sets up field labels. For this purpose she uses these properties: AnalysisUsage – determines the role of the current table field in a dimensional model (none, attribute, measure or both) AnalysisDefaultTotal – specifies the measure aggregation function and that it is used only when the AnalysisUsage property is set to Measure or Both AnalysisLabel – specifies the label that will be used for dimension attributes or measures and translations according to the labels structure in Microsoft Dynamics AX For the CustGroup table, set IsLookup = Yes, AnalysisIdentifier = Name For the CustTable table, set IsLookup = No, AnalysisIdentifier = Name For the InventItemGroup table, set IsLookup = Yes, AnalysisIdentifier = Name For the InventTable table, set IsLookup = No, AnalysisIdentifier = ItemName For the CustInvoiceJour table, set IsLookup = No, AnalysisIdentifier is empty For the CustInvoiceTrans table, set IsLookup = No, AnalysisIdentifier is empty Expand the AddressCounty table node. Expand the Fields node. Select the Name field. Open the properties palette by pressing ALT+ENTER. Set the AnalysisLabel property to County. Set the AnalysisUsage property to Attribute. In the same way set up the properties for the fields in the tables listed below: For the AddressState table: o field Name: set AnalysisLabel = State, AnalysisUsage = Attribute For the CustGroup table: o field Name: set AnalysisLabel = Customer Group, AnalysisUsage = Attribute For the CustTable table: o field AccountNum: set AnalysisUsage = Measure, AnalysisDefaultTotal = Count o field Name: set AnalysisLabel = Customer, AnalysisUsage = Attribute o field OneTimeCustomer: set AnalysisUsage = Attribute For the InventItemGroup table: o field Name: set AnalysisLabel = Item Group, AnalysisUsage = Attribute 5 After setting up perspectives Kate opens the BI Project Generation Options form. For the InventTable table: o field ItemName: set AnalysisLabel = Item Group, AnalysisUsage = Attribute For the CustInvoiceJour table: o field DueDate: set AnalysisLabel = Due Date, AnalysisUsage = Attribute o field InvoiceAmount: set AnalysisLabel = Invoice Amount, AnalysisUsage = Measure, AnalysisDefaultTotal = Sum For the CustInvoiceTrans table: o field InvoiceDate: set AnalysisUsage = Attribute o field Remain: set AnalysisLabel = Remaining Units, AnalysisUsage = Measure, AnalysisDefaultTotal = Sum o field LineAmount: set AnalysisLabel = Revenue, AnalysisUsage = Measure, AnalysisDefaultTotal = Sum o field Qty: set AnalysisUsage = Measure, AnalysisDefaultTotal = Sum o field OLAPCostValue: set AnalysisLabel = Cost Value, AnalysisUsage = Measure, AnalysisDefaultTotal = Sum In the Tools menu, select BI tools and then click BI project generation options. 6 On the General tab, Kate sets up the Datasource type and logging parameters. On the General tab of the BI Project Generation Options form, select the Microsoft SQL Server option button. 7 Then Kate defines the time dimensions that will be included in OLAP cube. Click the Time Dimensions tab. Clear the Standard calendar check box – the dimension for this calendar will not be created. Select the Fiscal calendar check box. Set Start date to 1/1/2000. Set End date to 12/31/2008. Select the Days, Year, Quarter, Month, and Week check boxes under Time periods. Make sure that other check boxes are cleared. Because English is the only language used in The Light Company, no translations will be necessary. Therefore, Kate deactivates the translation option. Click the Translations tab. Clear the Generate translations check box. Click OK to close the BI Project Generation Options form and save all the settings. 8 Finally Kate proceeds to generating the BI project. In the Tools menu, select BI tools and then click Generate BI project to open the Generate BI project form. Now Kate specifies the name, location, and perspectives for the project to be generated. Specify the folder that will be used for storing your project, for example, C:\Work. Enter the project name, for example, DemoCustCube. Select the Open generated project check box. Select the check box for the DemoCustCube perspective and clear all other check 9 boxes. Click OK to start the BI project generation process. The BI project was created and opened in Visual Studio .Net 2005. Kate verifies whether the project was created correctly. Open Solution Explorer (if not opened yet). Expand the Cubes node. Double-click the DemoCustCube.cube node. 10 The cube definition opens. On the Cube Structure tab, Kate sees three sections: Data Source View Measures Dimensions On the Data Source view, relations between Microsoft Dynamics AX tables and queries are displayed. 11 In the Measure section, cube measures are displayed. All measures generated for one table are under one measure group. Only three tables have measures though the Measures section contains four measure tables, because the fourth is the Exchange rate measure containing aggregated exchange rates. Kate verifies all measures and ensures that all measures for all perspective fields with AnalysisUsage = Measure are displayed and that the Count measure was created automatically for each measure group. Cube dimensions are displayed in the Dimensions section. Each dimension can contain elements of two types: Hierarchies – user-defined hierarchies in cube dimensions are based on the same database dimension. Attributes – dimension attributes in cube dimensions are based on the same database dimension. Kate ensures that only the Default Language is present. Click the Translations tab. 12 Before deploying the designed BI project on SSAS, Kate verifies the data source and cube deploying parameters. If the parameters are incorrect, the cube will not be deployed or processed. In Solution Explorer, right-click the DemoCustCube project definition. In the shortcut menu, click Properties. 13 In the DemoCustCube Property Pages form, Kate modifies some of the parameters. Expand the Configuration Properties node. Select the Deployment node. Set the Deployment Mode parameter to Deploy Changes Only. Set the name of the server in the Server parameter (if the server run locally, localhost can be set). Click OK to confirm changes. 14 Kate opens the Data Source Designer. In Solution Explorer, expand the Data Sources node. Double-click the Dynamics Database node. Kate changes data source parameters. On General tab, set the Isolation parameter to ReadCommitted, because the database used is not compatible with the Snapshot isolation mode. Click OK to confirm changes. 15 Finally, Kate saves the project. Click the Save All toolbar button. Then Kate proceeds to deploying the BI project on SSAS. By default, the deployment process includes: Project building Cube deployment (cube model is stored on SSAS) Cube processing (aggregated data from a data source is stored in a cube) Right-click the DemoCustCube project and, in the shortcut menu, click Deploy. 16 When the deployment process completes, the “Deployment Completed Successfully” message appears. After that Kate verifies that the cube works properly. In Solution Explorer, expand the Cubes node. Double-click the DemoCustCube.cube node. Click the Browser tab. The pivot table constructor page opens. This page is divided on three parts: 1. The list of measures and dimensions on the left. 2. The filters list on top. 3. The pivot table sketch in the center. 17 Kate wants to build the Sales per customer in reporting period report to verify how the cube was processed. First, she sets customer names to be displayed in the Rows section of the pivot table. Expand the Customers dimension node. Select the Customers.customers attribute. Drag this attribute to the Drop Row Fields Here field on the pivot table sketch. 18 Next, she defines that periods must be displayed in the Columns section. Expand the Time dimension node. Select the FiscalYears FiscalQuarters FiscalMonths FiscalWeeks FiscalDate hierarchy. Drag this hierarchy to the Drop Column Fields Here field on the pivot table sketch. 19 And finally, Kate drags Invoice Amount from the Customer invoice journal node to the Totals or Details section. Expand the Measures node. Expand the Customer invoice journal node. Select the Invoice Amount measure. Drag this measure to the Drop Total or Detail Fields Here field on the pivot table sketch. 20 Kate drills down this pivot table and verifies that all data is correct. 21