In this chapter
Introduction |
Components of the Microsoft Dynamics AX 2012 BI solution |
Implementing the prebuilt BI solution |
Customizing the prebuilt BI solution |
Creating cubes |
Displaying analytic content in Role Centers |
Business Intelligence (BI) technology helps users of computer-based applications understand hidden trends and exceptions within data. Nowadays, it’s difficult to find a developer who is unaware of BI, so this chapter assumes that you are familiar with BI concepts.
Microsoft Dynamics AX 2012 includes a comprehensive prebuilt BI solution, which is designed to meet many of the BI needs of your users. This means that instead of having to build a BI solution from the ground up, you may be able to use the prebuilt solution and tweak it to meet any remaining requirements. With this proposition in mind, this chapter walks you through the life cycle of the Microsoft Dynamics AX 2012 analytic components—from implementation through customization and extension. When necessary, this chapter points you to relevant resources on the Internet.
The Microsoft Dynamics AX BI solution is built on top of the Microsoft BI framework. If your organization uses the Microsoft BI infrastructure, you can use the Microsoft BI tools and technologies to extend the power of the Microsoft Dynamics AX BI solution.
Figure 10-1 shows a simplified architecture diagram of the BI solution that is included with Microsoft Dynamics AX 2012. In the figure, the Microsoft Dynamics AX 2012 logical architecture has been simplified to highlight only the components that are relevant to the BI solution.
The solution is divided into three tiers:
Data tier Contains sources of data, such as the Microsoft Dynamics AX 2012 operational database, often referred to as the online transaction processing (OLTP) database.
Integration tier Contains the Application Object Server (AOS), programming interfaces, and staged data, such as Microsoft Dynamics AX 2012 cubes, that serve as the database for analytical reporting. (This tier is called the middle tier in Chapter 1. It is called the integration tier in this chapter because that is how it is commonly known in BI solutions.)
Presentation tier Contains tools and user interface elements that users can use to interact with data.
For details about the three tiers and a more detailed diagram, see Chapter 1.
Traditionally, BI solutions are implemented during the second or third phase of an Enterprise Resource Planning (ERP) implementation project. Needless to say, project fatigue sets in (and the budget gets exhausted), and subsequent phases are postponed or delayed. BI implementation is complex and involves the integration of many components. Also, the skill set required to implement a BI solution is distinctly different from the skill set required to implement an ERP system. Often, implementation of the BI solution involves engaging a different partner or consultants. All of these factors contribute to postponing the BI implementation.
Microsoft Dynamics AX 2012 simplifies the implementation of a BI solution, so that all Microsoft Dynamics AX 2012 partners and customers (regardless of whether they have access to BI specialists) can implement the prebuilt BI solution when they implement the ERP functionality.
In Microsoft Dynamics AX 2012, the default SQL Server Analysis Services (SSAS) project is a first-class citizen of the Application Object Tree (AOT), as are other SSAS projects that you create in the AOT. This means that SSAS projects derive all of the benefits of being residents of AOT.
SSAS projects respect the layering concept. This means that an independent software vendor (ISV) or partner can distribute a customized version of an SSAS project that adds additional analytic components to the solution that is included in the SYS layer.
You can import and export SSAS projects to and from different environments as part of a model (by using models or .xpo files).
SSAS projects respect the version control capabilities offered by AOT-based artifacts.
When you deploy a project by using the SQL Server Analysis Services Project Wizard, which is new in Microsoft Dynamics AX 2012, the wizard selects the project in the highest layer for deployment. If you examine the Visual Studio Projects node in the AOT, will see the default SSAS project that is included with Microsoft Dynamics AX 2012, as shown in Figure 10-2. If you have any customizations at higher levels, they are also displayed.
Implementing the prebuilt BI solution consists of the following steps:
The following sections describe each step in further detail.
Before you implement the analytic components in the prebuilt BI solution, the following Microsoft Dynamics AX core components should be in place:
At least one AOS instance must be implemented.
The Microsoft Dynamics AX Windows client must be implemented, and the initialization checklist must be completed.
The Enterprise Portal web client must be configured.
If you are implementing the analytic components on a development or test instance, you might not implement a scale-out architecture. However, if you are implementing these components in a production system, you may want to implement a redundancy or load balancing infrastructure. You need to configure the clustering or Network Load Balancing (NLB) solution before you implement the analytic components.
This step configures a given SSAS server for the Microsoft Dynamics AX 2012 analytic components. To do so, run the Configure Analysis Extensions step in the Microsoft Dynamics AX Setup wizard on the SSAS server that hosts Microsoft Dynamics AX 2012 cubes.
Running the configuration step should take you a few minutes. This function does the following:
Ensures that the SSAS server has all of the necessary prerequisites to host Microsoft Dynamics AX 2012 cubes.
Adds the Business Connector (BC) proxy user as an administrator of the SSAS server. This step is required to enable AXADOMD data extensions to operate without the use of Kerberos constrained delegation.
Allows you to add a read-only user account to the Microsoft Dynamics AX 2012 database for processing cubes (you should specify a domain account whose password does not expire).
When you deploy cubes, Microsoft Dynamics AX generates and processes an OLAP database by using the metadata definition contained within the Analysis Services project that is included with Microsoft Dynamics AX 2012. The result is an OLAP database that contains Microsoft Dynamics AX cubes that are referenced by analytic reports and Role Centers.
In a Microsoft Dynamics AX 2012 R2 environment where there is only a single partition, the deployment step generates a single OLAP database that sources data from the Microsoft Dynamics AX OLTP database. In a multiple-partition environment, the deployment step generates multiple OLAP databases that correspond to each partition. Figure 10-3 shows the deployment process both in a single-partition and multiple-partition environment. For more information about partitions, see Chapter 17.
You use the SQL Server Analysis Services Project Wizard in the Microsoft Dynamics AX 2012 client to deploy, process, and in some instances, update cubes. To deploy the cubes, you must have the right to deploy projects to the SSAS server. If you are also processing the cubes, you must have the right to read the Microsoft Dynamics AX 2012 OLTP database.
To start the SQL Server Analysis Services Project Wizard and deploy cubes, do the following:
In the Development Workspace, on the Tools menu, click Business Intelligence (BI) Tools > SQL Server Analysis Services Project Wizard.
On the Welcome page, click Next, and then select the Deploy option on the next page, as shown in Figure 10-4.
On the next page, you select an SSAS project to deploy—in this case the Dynamics AX project. You can select a project in the AOT, as shown in Figure 10-5, or you can select a project that is saved on a disk.
Next, you specify the SSAS server to deploy the project to, the SSAS database you want to use, and whether you want the project to be processed after deployment (see Figure 10-6). By default, the wizard uses the SSAS server that you configured earlier, but you can select any server to deploy the project to.
In Microsoft Dynamics AX 2012, you can use any name for the OLAP database. In Microsoft Dynamics AX 2009, you couldn’t change the default name of the database, and this prevented a system administrator from using the same SSAS server to host multiple OLAP databases. However, if you do change the default name of the OLAP database, you need to configure the report server so that it reports source data from the corresponding OLAP database. For information about how to configure the OLAP database referenced by SQL Server Reporting Services (SSRS) reports, see “Configure Analysis Services by running Setup” at http://msdn.microsoft.com/en-us/library/gg751377.aspx.
As mentioned earlier, in a Microsoft Dynamics AX 2012 R2 environment with multiple partitions, the SQL Server Analysis Services Project Wizard generates an OLAP database for each partition. You can use the wizard to select the partitions for which OLAP databases are created, as shown in Figure 10-7.
In this case, the SQL Server Analysis Services Project Wizard deploys the SSAS project to multiple OLAP databases. In each database, <partitionkey> is added as a suffix to the name of the OLAP database.
Also, within each OLAP database, the data source view (DSV) is modified so that a partition filter is applied to all queries. Figure 10-8 shows the architecture of an environment with multiple partitions.
In all cases, the SSAS project in the AOT is partition-unaware, whereas the OLAP databases that are deployed are partition-specific. The SQL Server Analysis Services Project Wizard handles the step of making sure that each OLAP database is wired to read data only from the corresponding partition in Microsoft Dynamics AX. This is a departure from the behavior of Microsoft Dynamics AX 2012. You need to be aware of the following implications:
If you deploy Microsoft Dynamics AX SSAS projects by using Analysis Services tools, such as the Deployment Wizard or Business Intelligence Development Studio, the resulting OLAP database is not partition-aware. In other words, cubes will aggregate data across partitions.
If you want to extend an SSAS project, always check out and modify the project in the AOT. Do not customize a project associated with a specific partition by importing the project directly in Business Intelligence Development Studio. The Deploy function in the wizard will overwrite any partition-specific customizations that you have made directly on the server.
If you add custom query definitions in the DSV, the wizard adds where clauses to each select statement that restrict rows from other partitions.
The SQL Server Analysis Services Project Wizard lets you process deployed cubes directly. However, before processing, the wizard also runs through several prerequisite checks to ensure that cube processing will not fail later. If you are using demo data, you can ignore these preprocessing warnings and have the wizard process the cubes.
While the project is being processed, the wizard displays a progress page. When processing is complete, click Next, and the wizard will show the completion screen.
After you deploy and process Microsoft Dynamics AX cubes, you must grant users permissions to access them. Provisioning users involves two activities:
Associate an appropriate user profile with each Microsoft Dynamics AX user.
Provide Microsoft Dynamics AX users with access to the OLAP database.
The concept of a user profile was introduced in Microsoft Dynamics AX 2009. A user profile determines the Role Center that is displayed when a user starts the Microsoft Dynamics AX client. A user can be associated with only one profile.
If you do not associate a user profile with a user in Microsoft Dynamics AX, the default Role Center is displayed when the user displays the Home area page in the Microsoft Dynamics AX client. To associate a profile with a given user, click System Administration > Common > Users > User Profiles (see Figure 10-9). You can associate either one user at a time or multiple users with a given profile by using this form.
You can also associate a user with a profile in the Users form (System Administration > Common > Users > Users). Changes to a user profile take effect the next time the user starts the Microsoft Dynamics AX client.
Unless you provide your users with access to the OLAP database, they cannot open reports and display key performance indicators (KPIs) drawn from cubes in their respective Role Centers. Security permissions defined in Microsoft Dynamics AX 2012 are not automatically applied to OLAP databases. You must grant access to OLAP databases manually by using SQL Server management tools, such as SQL Server Management Studio. For step-by-step instructions, see “Grant users access to cubes” at http://msdn.microsoft.com/en-us/library/aa570082.aspx.
As you have seen in the previous section, it’s relatively easy to implement the prebuilt BI solution in Microsoft Dynamics AX 2012. But regardless of how good the prebuilt BI solution is, you may want to change the functionality to suit your needs.
These changes can be divided into three broad categories:
Configuration Although the prebuilt BI solution is designed to cover all of the functionality in Microsoft Dynamics AX 2012, you may have implemented only certain modules. Even within those modules, you may have chosen to disable certain functionality. In Microsoft Dynamics AX, license codes and configuration keys govern the availability of modules and functionality, respectively. (For more information, see Chapter 11.) Configuration keys correspond to functionality within modules. They can be enabled or disabled.
If you do not activate certain license codes or if you disable certain configuration keys, the Microsoft Dynamics AX user interface configures itself by removing content that is associated with those elements. In this case, you may need to remove the corresponding analytic content. (However, because the prebuilt BI solution draws data from across Microsoft Dynamics AX, this content will not be hydrated with data in any case.) You can use the SQL Server Analysis Services Project Wizard to remove the corresponding content from the prebuilt cubes, so that you do not have to remove the irrelevant content manually yourself.
Customization You might want to add additional calendars and financial dimensions, and also new attributes and measures, to the prebuilt cubes. The SQL Server Analysis Services Project Wizard lets you perform the most frequent customizations with a step-by-step approach, without requiring BI development skills.
Extension At some point, you may want to develop extensions to prebuilt cubes by using the SQL Server BI development tools. Table 10-1 lists categories of customizations, summarizes the types of changes that you can make, and lists the skill level, time, and tools required to make those types of changes.
Table 10-1. Types of customizations.
Configuration | Customization | Extension | |
---|---|---|---|
Nature of change | Apply the Microsoft Dynamics AX configuration to cubes; add or remove languages | Add calendars or financial dimensions; add or remove measures and dimensions | Any |
Skills | Knowledge of Microsoft Dynamics AX concepts | Ability to define Microsoft Dynamics AX metadata | BI development skills |
Tools | SQL Server Analysis Services Project Wizard | AOT; SQL Server Analysis Services Project Wizard | Business Intelligence Development Studio |
Time required | Low | Medium | High |
The following sections describe the processes for customizing the Microsoft Dynamics AX 2012 prebuilt BI solution.
As previously explained, you can configure the predefined analytic content to reflect configuration changes in Microsoft Dynamics AX in a matter of minutes by using the SQL Server Analysis Services Project Wizard. In Microsoft Dynamics AX 2009, this process had to be performed manually. This process required BI development skills and a day or two of spare time. Microsoft Dynamics AX 2012 dramatically simplifies this process by introducing the following three improvements:
Static schema Historically, Microsoft Dynamics AX has had a schema whose shape changed depending on licenses and configuration keys. That is, when a configuration key was turned off, the database synchronization process dropped tables and data that were deemed invalid. This caused prebuilt cubes (that rely on a static schema in the underlying database) to break at processing time. Unlike its predecessor, Microsoft Dynamics AX 2012 has a static schema. So, when configuration keys are disabled, the database schema no longer changes. This means that prebuilt cubes can continue to be processed without generating errors. (They will, for example, contain empty measures, because the corresponding tables have no data).
Improved modeling capabilities in the AOT The Microsoft Dynamics AX 2009 OLAP framework did not allow advanced modeling of constructs in the AOT. As a result, developers had to implement any functionality that was lacking directly in an SSAS project. In Microsoft Dynamics AX 2012, a larger portion of analytic content is modeled in the AOT. Therefore, configuring the content can be done much more easily by the framework.
Wizard-driven user interface The six different forms that were necessary in Microsoft Dynamics AX 2009 have been replaced by a single step-by-step wizard that guides you through various activities.
To configure the prebuilt BI project, you must have developer privileges in Microsoft Dynamics AX. This step modifies the project so that irrelevant measures, dimensions, and entire cubes are removed after the process is completed. The modified project will be saved in the AOT in your own layer.
To configure the project, start the SQL Server Analysis Services Project Wizard, and then select the Configure option. You then need to select the project to configure. Select the Dynamics AX project to configure the prebuilt project, and step through the wizard. For step-by-step instructions, see the “How to: Configure an Existing SQL Server Analysis Services Project” at http://msdn.microsoft.com/en-us/library/gg724140.aspx.
If you also deploy and process the project, you should notice the following changes:
Cube content (such as measures and dimension attributes that source data from tables that are affected by disabled configuration keys) is deleted from the project. You may see that entire cubes have been removed if the corresponding content has become invalid.
KPIs and calculated measures have been removed in cubes that depend on disabled measures and dimension attributes.
OLAP reports in Role Centers that source data from cubes that have been removed no longer appear on the Role Center page. If a user intentionally adds such a report to the Role Center, the report displays a warning message and will execute.
KPIs and measures that were removed no longer appear in the Business Overview web part.
When you start the SQL Server Analysis Services Project Wizard, the third option after Deploy and Configure is Update. This option lets you customize the project.
Figure 10-10 shows the process for updating a cube. The following sections walk through each step in detail.
The first step is selecting the project to modify. You can select an SSAS project in the AOT or a project maintained on disk. The wizard performs basic validation of the selected project before you can proceed. The update process is designed to ensure that you end up with a project that you can deploy and process without any errors. If the selected project does not build (the most basic measure of validity), the wizard will not let you proceed to the next step.
Next, you select the Microsoft Dynamics AX metadata that you want to include or exclude, as shown in Figure 10-11. The metadata that is defined in the Perspectives node in the AOT is the source of metadata for the prebuilt BI solution. By including or excluding metadata definitions, you can include (or exclude) measures, dimensions, and even cubes.
For example, if you remove the Accounts Receivable perspective from the selection, the Accounts Receivable cube will be removed from the project that you are updating. If you model a new perspective in the AOT and include it in the project, the corresponding measures and dimensions will be created and added to the SSAS project.
For a description of metadata definitions and the resulting analytic artifacts, see “Defining Cubes in Microsoft Dynamics AX” at http://msdn.microsoft.com/en-us/library/cc615265.aspx. Metadata is also covered in further detail later in this chapter, in the Creating cubes section.
On the next wizard page, you are prompted to select the Microsoft Dynamics AX financial dimensions to include in the project, as shown in Figure 10-12.
Each financial dimension that you select is added as an OLAP dimension with the same name. If a dimension by that name already exists within the SSAS project, the system will disambiguate the newly added dimension by adding a suffix.
Next, the wizard prompts you to select the calendars to include as date dimensions, as shown in Figure 10-13. If you have defined any additional calendars, you can include them in the project at this point.
In Microsoft Dynamics AX 2009, the prebuilt analysis project included two date dimensions: a Gregorian calendar–based dimension called DATE and a fiscal calendar–based dimension called FISCALPERIODDATEDIMENSION. If you wanted to include additional date dimensions, you would have had to customize the prebuilt project by using Business Intelligence Development Studio.
Microsoft Dynamics AX 2012 includes a utility called Date Dimensions (see Figure 10-14) that lets you define custom calendars for analysis purposes. A default calendar, Date, is included with the product, and you can define additional calendars by using Date Dimensions.
For each calendar that you add on this wizard page, the system creates a date dimension in the SSAS project. For example, if you added a new calendar called Sales Calendar, the system will add a date dimension called Sales Calendar. In addition, the system will create role-playing date dimensions that correspond to each of the dates that are present in cubes. You can’t remove the prebuilt date dimension from the project.
You can start Date Dimensions directly from the SQL Server Analysis Services Project Wizard, or from the System Administration area page.
You can define a calendar by selecting the beginning of the year and the first day of the week. For example, for the Sales calendar, the year starts on April 1 and ends on March 31, and the week starts on Sunday. You can enter a date range to specify the calendar records that you want the system to populate in advance. You can also select the hierarchies that will be created for each calendar.
When you close the form, if you added or modified calendars, the system will populate dates according to the new parameters that you defined. In addition, the system will add the required translations. As you will notice later, the system adds a rich set of attributes for each calendar defined here. You can use any of these attributes to slice the data contained in cubes.
In addition, Date Dimensions adds a NULL date record (1/1/1900) and a DATEMAX date record (31/12/2154) to each calendar, so that fact records that contain a NULL date or the DATEMAX date will be linked to these extra records, preventing an “unknown member” error from occurring during cube processing.
The prebuilt SSAS project uses EN-US as the default language. However, you might have sites in other countries/regions and want the users there to be able to view measure and dimension names in their own languages.
The project can include additional languages through a feature in SSAS called Translations. The Translations feature enables dimensions, measures, many other kinds of metadata, and data to be translated to other languages by letting you add companion text in other languages.
For example, if you add German translations to the project, when a German user views data in a cube by using, for example, Microsoft Excel, data labels are displayed in German.
The prebuilt SSAS project does not include translated strings. However, translated labels are already available in the system. The SQL Server Analysis Services Project Wizard lets you add any of the required languages to the project by using existing translations from within Microsoft Dynamics AX, as shown in Figure 10-14.
It is recommended that you add only the translations that you need. Each translation adds strings to your project, and the size of the project increases by a few megabytes each time you add a language. In addition, processing gets a bit slower and the size of the backup increases.
If you have the Standard edition of SQL Server 2005 or SQL Server 2008, you could not add additional translations (for Microsoft Dynamics AX 2009). You had to buy the Enterprise edition of SQL Server in order to add translations to cubes. This restriction has been removed in SQL Server 2008 R2 and later versions.
Labels associated with Microsoft Dynamics AX tables and views are carried through to the corresponding dimensions and measures. It is also possible to add specific labels to dimensions and measures by defining the labels in perspectives. For more information, see the section Define perspectives later in this chapter.
If you manually add translations to the project in Business Intelligence Development Studio, the wizard overwrites the labels every time you run the Update function, by sourcing labels from Microsoft Dynamics AX. To add your own translations, either define a new label and associate it with the object or change the translation in Microsoft Dynamics AX by using Microsoft Dynamics AX Label Editor.
The prebuilt SSAS project contains the logic to convert measures that are based on the Microsoft Dynamics AX extended data type (EDT), AmountMST, to other Microsoft Dynamics AX currencies. For example, if the amount was recorded in USD, you can display the value of the amount in GBP or EUR by using the analysis currency dimension to slice the amount.
If you want to, you can exclude currency conversions by clearing the check box on the wizard page shown in Figure 10-15.
Removing support for currency conversion not only removes this feature but might also cause prebuilt reports to fail, because they rely on the currency conversion option to be displayed in Role Centers.
For more information about currency conversion, see the section Add currency conversion logic in the Creating cubes section.
When you click Next on the Add Currency Conversion page, the wizard goes to work, performing the following tasks:
Generates a new project based on the perspectives and other options that you have chosen.
Compares the newly generated project with the project you wanted to update.
Displays the differences between the new project (that is, the changes you want to apply) and the old project, as shown in Figure 10-16.
In the wizard, it is assumed that you want to confirm all changes; therefore, all changes are selected by default. If you want the wizard to apply all changes, click Next, and then the wizard will create a project that includes the changes that you selected.
However, if you are an experienced BI developer and want more granular control of the Update option, you can examine the updates in detail and accept or reject the changes.
Be aware, however, that making changes to the wizard at a granular level may result in inconsistencies within the analysis project. If such inconsistencies result in a project that does not build, the wizard displays a message to inform you.
Here are some examples of when you might want to evaluate changes individually:
You might have removed some perspectives from the generation process (for example, you have not implemented Project Accounting functionality in Microsoft Dynamics AX and are therefore not interested in the Project Accounting cube). Ordinarily, the system would remove the resulting analytic artifacts, including a dimension. However, you may want to use that dimension in analysis, even if the Project Accounting cube is not used. Therefore, you reject the deletion of that dimension.
You have added extra attributes to the customer dimension by using Business Intelligence Development Studio. The system would ordinarily delete these extra attributes, because they are not associated with Microsoft Dynamics AX metadata. However, you may want to reject the deletion and keep these extra attributes intact.
If you make too many customizations directly within BI Development Studio, the wizard detects a large number of changes. You must then review each change and approve or reject it. At some point, running the wizard to update the project may cause too much overhead. Therefore, if you are an experienced BI developer, and you have customized the prebuilt project extensively within Business Intelligence Development Studio, don’t use the Update function again. Instead, maintain your project in Business Intelligence Development Studio.
Next, the wizard applies the changes you specified in the previous step. If you simply clicked Next (that is, you did not make any changes to the options selected by the wizard), the wizard would save the resulting project.
If you made changes and the wizard encountered inconsistencies (that is, the project is in an error state and does not build), it displays a warning asking whether you want to save the project or go back to the confirmation step and reconsider the changes.
If you choose to save the project in an inconsistent state (if you are an experienced BI developer, you might choose this approach), you must fix the project by using Business Intelligence Development Studio; otherwise, subsequent deployment steps will be unsuccessful.
Next, you can deploy the cubes to an SSAS server and, optionally, process the cubes. As discussed in the Deploy cubes section earlier in this chapter, in a multiple-partition environment in Microsoft Dynamics AX 2012 R2, the system will deploy the project to multiple SSAS databases.
As discussed earlier in this chapter, you can customize the prebuilt analysis project relatively easily by using the SQL Server Analysis Services Project Wizard. But in some cases, you may want to make deeper customizations. For example, you might want to:
Create a rich hierarchy, such as a parent/child hierarchy to model organizational units.
Add new KPIs.
Bring external data into the analysis project and create a custom dimension.
You can use Business Intelligence Development Studio to make these types of changes.
Because the prebuilt BI components are included in the AOT as an SSAS project, you can modify the project. To modify the prebuilt Analysis Services project, do the following:
In the AOT, expand the Visual StudioAnalysis Services Projects node.
Right-click the project that you want to modify, and then click Edit.
An Infolog message appears, stating that a copy of the SSAS project has been created and saved, as shown in Figure 10-17.
If SQL Server Business Intelligence Studio is installed, it will start and open the copy of the project. Changes that you make to the project are not automatically saved to the AOT. You need to save the project and import it back into the AOT.
Figure 10-18 shows the prebuilt SSAS project in Business Intelligence Development Studio.
The following sections describe the components of the project.
The DSV contains the table and view definitions that are used by analytic artifacts. Notice that the OLAP framework has implemented several query definition patterns in the DSV:
Financial dimensions that the wizard has added appear as custom query definitions in the DSV.
The OLAP framework has created query definitions corresponding to Microsoft Dynamics AX views.
The OLAP framework has added a reference relationship to resolve virtual companies, if your Microsoft Dynamics AX installation has virtual company definitions.
The OLAP framework has created views that make Microsoft Dynamics AX enumerations accessible in all of the languages that have been added to the project.
Avoid modifying any of the framework-generated objects in the DSV. Any changes that you make to these objects are overwritten without warning the next time you update the project.
You may add your own objects to the DSV (for example, new query definitions. The Project Update option will preserve these objects.
In Microsoft Dynamics AX 2012 R2, do not implement any partition-specific logic in any of the query definitions. Otherwise, when the project is deployed to multiple partitions, the system may generate processing errors. (Because the framework adds partition-specific logic to the DSV at deployment time, it may not apply the changes accurately to your query definitions.)
In Figure 10-18, notice the dimensions that are included with the Microsoft Dynamics AX 2012 prebuilt BI solution, as well as the measures and measure groups.
For a list of measures and dimensions, see “Cube and KPI reference for Microsoft Dynamics AX 2012” at http://msdn.microsoft.com/en-us/library/hh781074.aspx.
The SSAS project contains prebuilt KPIs and calculations. Microsoft Dynamics AX 2012 does not provide the capability to model KPIs and calculations in the AOT. You can modify these definitions or add new ones directly in Business Intelligence Development Studio.
Data warehouses are a popular solution for providing analytic capabilities to users. Until recently, data warehouses were the only reasonable solution for building robust analytic capability. However, as applications become easily interoperable and as technologies such as in-memory databases and OLAP become cost-effective and simpler to use, building a data warehouse is not the only solution to meet analytic requirements.
Table 10-2 presents several architecture options for integrating external data with the prebuilt analytic solution; a data warehouse is just one of the options. The columns represent architecture options, whereas the rows represent the benefits and cost implications of each option.
Table 10-2. Options for integrating external data with Microsoft Dynamics AX for analysis.
When most data is in Microsoft Dynamics AX (assuming that Microsoft Dynamics AX is the predominant source of data in the organization), you have two options.
The data mash-up option is best suited to an environment where capable users author and publish analyses for the use of others. This option relies on client tools such as Excel PowerPivot. Microsoft Dynamics AX 2012 enables Microsoft Dynamics AX queries to be published to data mash-up tools through OData feeds, or as data exports to Excel.
You can bring external data into Microsoft Dynamics AX either through services (data services consumed by means of inbound ports) or as batch jobs that are executed periodically to import data into tables. With this approach, external data is represented as read-only data within Microsoft Dynamics AX. The benefit to this approach is that external data appears as native Microsoft Dynamics AX data to Microsoft Dynamics AX tools. You can create analytics, reports, and inquiry forms that use the combined data.
A more complex approach involves integrating external data directly into the prebuilt BI solution. With this option, a BI developer adds another data source to the prebuilt BI solution by using Business Intelligence Development Studio. Additional data tables are brought into the DSV by using the new data connection. It is possible to create dimensions and measures by using the new tables in the DSV.
The traditional ETL-based data warehouse option is suited to scenarios that require complex transformations or large volumes of data. Although this option is more flexible in terms of capabilities, it is also the most expensive to implement and manage.
You might want to build a data warehouse to implement the following scenarios:
Integrate external data sources with Microsoft Dynamics AX data In this approach, the Microsoft Dynamics AX implementation serves as one of many corporate applications. Although Microsoft Dynamics AX contains some of the corporate data, other systems contain a considerable portion of the data. To make decisions, data must be combined across systems, and the data warehouse serves that need.
Incorporate legacy data into Microsoft Dynamics AX analytics Most organizations migrate recent data when implementing Microsoft Dynamics AX. Legacy data is still maintained in read-only instances of legacy applications. Although legacy data is no longer used for operational purposes, it is required for historical trend analysis. A data warehouse serves as the repository where legacy data is combined with current data.
Although Microsoft Dynamics AX 2012 does not directly support the creation of a data warehouse schema, the following artifacts generated in Microsoft Dynamics AX 2012 can be used to build a data warehouse:
The DSV generated as part of the prebuilt analytic solution can be used within SQL Server Integration Services when an ETL package is developed to extract data from Microsoft Dynamics AX.
Microsoft Dynamics AX document services can be consumed as data sources based on Simple Object Access Protocol (SOAP).
Microsoft Dynamics AX queries can be exposed as OData feeds.
This section discusses how to create new cubes and reports by using tools built into Microsoft Dynamics AX 2012.
Figure 10-19 shows the four-step process for creating a new cube.
The following sections describe each step in more detail.
Often, when a user asks for additional information, you get a request for a new report (or two or three). For example, you might get a requirement request for a report like the one shown in Figure 10-20 from someone in the Sales department.
This report shows sales revenue trends by sales channel. More formally stated, this report shows sales revenue by sales channel by calendar month.
The request for this report might be followed by requests for “a few additional reports.” Some of the typical follow up questions would be:
What about quarterly trends? Is there seasonality?
Are some regions doing better than others?
Can we see the number of units sold instead of revenue?
Can we see the average unit price? Are steep discounts being given?
If you were to build a PivotTable to answer these questions (which is probably a good idea, because this would let the users slice the data, thus saving you from the effort of building all of those reports), you could construct a PivotTable like the one shown in Figure 10-21.
In this case, you have identified the measures (the numbers you are interested in) and the dimensions (the pivots for the data).
The following sections show how to build a cube to meet these requirements.
The next step is to determine which Microsoft Dynamics AX tables or views contain this information. For the purpose of this example, assume the following:
The CUSTTRANSTOTALSALES view contains sales invoice details.
The CUSTTABLECUBE view contains master data about customers.
The CUSTPAYMMODETABLE table contains payment mode information.
Next, you need to define the metadata that is required to generate the cube in the AOT. As you might recall from Microsoft Dynamics AX 2009, you define the metadata required to generate cubes in the Data DictionaryPerspectives node of the AOT.
Each perspective corresponds to a cube. Tables or views that are contained in a perspective node generate measures or dimensions. Depending on table relationships (and inferred view relationships), measures are associated with dimensions within the generated project.
If you want to designate a perspective node that contains only dimensions, Microsoft Dynamics AX 2012, includes a property at the perspective level specifically for this purpose: SharedDimensionContainer. If you designate a perspective as a shared dimension container, tables and views within that perspective will be used only to create dimensions. Moreover, all of the dimensions will be associated with all of the measures; that is, they are truly shared dimensions, provided that they are related in Microsoft Dynamics AX.
Follow these steps to create the new perspective for this example:
Create a new perspective node, and name it MyCustomers.
The new node contains two subnodes: Tables and Views.
Set the Usage property of the node to OLAP to designate that this perspective will be used to generate a cube.
If you are familiar with Microsoft Dynamics AX 2009, you may notice that the Ad-Hoc Reporting option for the Usage property is missing in Microsoft Dynamics AX 2012. You can select only OLAP or None. It is no longer possible to generate report models by using perspectives in Microsoft Dynamics AX 2012.
Drag the tables and views listed in the previous section into the newly created perspective.
For more information, see “How to: Create a Perspective for a Cube” at http://msdn.microsoft.com/en-us/library/cc617589.aspx.
Strictly speaking, table-level properties (see Figure 10-22) are optional. However, if you do use them, cubes will perform better.
You can also specify custom labels to give specific names to generated measure groups and dimensions. AnalysisDimensionLabel, AnalysisKeyAttributeLabel, and AnalysisMeasureGroupLabel are new properties introduced in Microsoft Dynamics AX 2012. Instead of providing English text, you can provide Microsoft Dynamics AX labels so that dimension names are translated into other languages. The AnalysisIdentifier property defines the field that provides the name for a dimension key. If you look at the Name field for this property in Figure 10-22, you will notice that the Methods Of Payment dimension is keyed by the Name field.
For more information, see “Business Intelligence Properties” at http://msdn.microsoft.com/en-us/library/cc519277.aspx.
If you are a fan of the semantics introduced with the IsLookUp property in Microsoft Dynamics AX 2009, you will be pleased to know that views in Microsoft Dynamics AX 2012 provide this functionality. However, the IsLookUp property will be deprecated in future releases, so it is recommended that you do not use this property.
Defining field-level properties is the key step in defining metadata. You need to identify individual measures and attributes that are necessary in the cube.
First, expand the CUSTTRANSTOTALSALES view, and set the field properties as shown in Table 10-3.
Table 10-3. Field-level property settings for the sales report example.
Field | AnalysisUsage | AnalysisDefaultTotal | ExchangeRateDateField |
---|---|---|---|
AmountMST | Measure | Sum | TransDate |
TransType | Attribute | Auto | |
TransDate | Attribute | Auto | |
All others | Auto | Auto |
The AmountMST field will generate a measure that is summed when it is aggregated. ExchangeRateDateField is a new attribute added in Microsoft Dynamics AX 2012 for currency conversion. In this example, the OLAP framework should convert the AmountMST measure to all available currencies, so that users can analyze transactions (possibly conducted in different currencies) across a common currency. The TransDate field contains the date on which the measure will be converted into other currencies with Microsoft Dynamics AX exchange rates.
Users need to be able to slice the data by TransType and TransDate, so these fields are designated as attributes.
Next, open the CUSTTABLECUBE view, and set the field-level properties as shown in Table 10-4.
Finally, expand the CUSTPAYMODE table, and set the field-level properties as shown in Table 10-5.
For more information about field-level properties, see “Business Intelligence Properties” at http://msdn.microsoft.com/en-us/library/cc519277.aspx.
After you define the necessary metadata, you can generate an SSAS project by using the SQL Server Analysis Services Project Wizard. You can deploy and process the project directly from the wizard, or you can open the project in BI Development Studio and extend it by using SQL Server functionality.
In the wizard, select the Create option, because you are creating a new project, and provide a name. Alternatively, if you want to include the new cube in the prebuilt SSAS project, you can select the Update option.
On the next page, select the perspectives that are used to generate cubes and dimensions within the project. For this example, you would select the MyCustomers perspective. You can include one or more perspectives within the same project.
You can also include Microsoft Dynamics AX financial dimensions, in addition to Microsoft Dynamics AX calendars and Microsoft Dynamics AX languages, as discussed earlier in this chapter.
Next, the wizard lets you add currency conversion logic to the project.
As you may recall, while defining field-level properties for the perspective, AmountMST was identified as a measure that needs to be converted to other currencies. The AmountMST field contains an amount that is recorded in the accounting currency of the company. Because Microsoft Dynamics AX might contain multiple companies that have different accounting currencies, transactions might be recorded in different accounting currencies.
For example, the CEU company’s accounting currency is GBP, whereas the CEUE company’s accounting currency is USD. In the AmountMST field, sales for CEU are recorded in GBP, whereas those for CEUE are recorded in USD.
Because a cube aggregates data across companies, a user browsing the cube could inadvertently add GBP values to USD values unless something is done to differentiate the two amounts. The Microsoft Dynamics AX 2012 OLAP framework builds this mechanism for you in the form of currency conversion support.
Microsoft Dynamics AX 2012 cubes contain two system dimensions: Currency and Analysis Currency. If the user uses the Currency dimension to split the measures that are shown, Microsoft Dynamics AX displays amounts only in the chosen currency. If the user uses the Analysis Currency dimension to split the measures that are shown, all amounts are shown, but the resulting values are converted to the chosen analysis currency by using Microsoft Dynamics AX exchange rates. This happens through currency conversion.
Here is an example: assume that the transactions shown in Figure 10-23 are included in the CUSTTRANSTOTALSALES view. (Note that two columns have been added, Accounting Currency and AmountCur, to clarify that each company has a different accounting currency.)
If a user creates a PivotTable and displays the total AmountMST value split by the Analysis Currency dimension, the result is as shown in Figure 10-24.
To get the value of AmountMST in USD, the system calculated the USD equivalent of each of the amounts, as shown in Figure 10-25.
To determine the exchange rate between CAD and USD, and between GBP and USD, the system used the field-level metadata tag ExchangeRateDateField. For this example, the ExchangeRateDateField value for AmountMST is TransDate. So the TransDate value associated with each record was used to find the exchange rate to use for the conversion.
Microsoft Dynamics AX 2012 has the concept of a rate type. In other words, multiple exchange rates can be associated with a given company. A company can use different rates for different purposes or different rates for different locations. The Microsoft Dynamics AX 2012 OLAP framework uses the system exchange rate type for the currency conversion logic. This rate type is a systemwide parameter that a system administrator specifies on the System Parameters form (System Administration > Setup > System Parameters), as shown in Figure 10-26.
If you create a PivotTable with the Currency dimension, AmountMST values are filtered by the specified currency, as shown in Figure 10-27. You would expect this behavior if you created a PivotTable with any dimension.
Provided that you define the field-level metadata tag ExchangeRateDateField, the wizard adds the currency conversion calculation to the generated project as a multidimensional expression (MDX) script. The wizard also adds the system dimension Analysis Currency (the Currency dimension is added regardless of whether you select currency conversion). The wizard also creates an intermediate measure group called Exchange Rates By Day in each cube.
If you open the generated project in Business Intelligence Development Studio, you can see the currency conversion calculation created by the wizard:
CALCULATE; //----------------------------------------------------------------------------- // Dynamics AX framework generated currency conversion script. // Customizing this portion of the script may cause problems with the updating // of this project and future upgrades to the software. //----------------------------------------------------------------------------- Scope ( { Measures.[Amount] } ); Scope( Leaves([Exchange rate date]), Except([Analysis currency].[Currency].[Currency].Members, [Analysis currency].[Currency].[Local]), Leaves([Company])); Scope( { Measures.[Amount] } ); This = [Analysis currency].[Currency].[Local] * ((Measures.[Exchange rate], StrToMember("[Currency].[Currency].&["+[Company].[Accounting currency].CurrentMember.N ame+"]")) / 100.0); End Scope; End Scope; Scope( Leaves([Exchange rate date]), Except([Analysis currency].[Currency name].[Currency name].Members, [Analysis currency].[Currency name].[Local]), Leaves([Company])); Scope( { Measures.[Amount] } ); This = [Analysis currency].[Currency].[Local] * ((Measures.[Exchange rate], StrToMember("[Currency].[Currency].&["+[Company].[Accounting currency].CurrentMember.N ame+"]")) / 100.0); End Scope; End Scope; Scope( Leaves([Exchange rate date]), Except([Analysis currency].[ISO currency code].[ISO currency code].Members, [Analysis currency].[ISO currency code].[Local]), Leaves([Company])); Scope( { Measures.[Amount] } ); This = [Analysis currency].[Currency].[Local] * ((Measures.[Exchange rate], StrToMember("[Currency].[Currency].&["+[Company].[Accounting currency].CurrentMember.N ame+"]")) / 100.0); End Scope; End Scope; Scope( Leaves([Exchange rate date]), Except([Analysis currency].[Symbol].[Symbol].Members, [Analysis currency].[Symbol].[Local]), Leaves([Company])); Scope( { Measures.[Amount] } ); This = [Analysis currency].[Currency].[Local] * ((Measures.[Exchange rate], StrToMember("[Currency].[Currency].&["+[Company].[Accounting currency].CurrentMember.N ame+"]")) / 100.0); End Scope; End Scope; End Scope; //----------------------------------------------------------------------------- // End of Microsoft Dynamics AX framework generated currency conversion script. //-----------------------------------------------------------------------------
This logic is similar to the code added by the Define Currency Conversion option in the SSAS Business Intelligence Wizard. If the selected Microsoft Dynamics AX exchange rate type does not have records corresponding to the dates (for example, TransDate) that are present in data, the calculations will use the most recent rate for the corresponding currency pair.
After you specify currency conversion options, the system will generate the project and prompt you for a destination to which to save the project.
You can save the project in the AOT or on disk. This gives you the flexibility to maintain SSAS projects in the development environment of your choice. OLAP framework tools, such as the SQL Server Analysis Services Project Wizard, will work with projects whether they are on disk or in the AOT.
If you save the project in the AOT, the project will be saved in your layer.
You can deploy the project directly to the Analysis Services server at this stage. It’s important to note that the wizard calls the Analysis Services deployment functionality behind the scenes. If you do not have the Microsoft Dynamics AX Development Workspace (including Business Intelligence Development Studio) installed on your computer, this step may fail.
As discussed earlier, in Microsoft Dynamics AX 2012 R2 you can deploy a project to multiple partitions. If you have multiple partitions defined, you can deploy the project to the set of partitions you choose.
You can define KPIs by using Business Intelligence Development Studio after you generate the project. You implement KPIs and calculated measures by using MDX.
The KPIs and calculated measures in the prebuilt SSAS project are also created in this way. If you create your own KPIs and calculated measures, the SQL Server Analysis Services Project Wizard will preserve them when you perform updates.
For more information, see “Walkthrough: Defining KPIs for a Cube” at http://msdn.microsoft.com/en-us/library/dd261469.aspx.
If you are an expert MDX developer, you might be tempted to implement complex calculations and KPIs. However, a best practice is to move your calculations to Microsoft Dynamics AX views and tables as much as possible. This way, you not only use the expressive power of Microsoft Dynamics AX, but you also move the calculations that must be pre-aggregated, so that you get better run-time performance.
You can move calculations to Microsoft Dynamics AX in the following ways:
Reuse Microsoft Dynamics AX tables and fields Chances are that the Microsoft Dynamics AX schema already contains most of the calculations that you need. If the information is not directly available in the primary table, review secondary tables and fields to see if corresponding fields are available. A small investment in reviewing the schema will save you a lot of MDX code.
Define Microsoft Dynamics AX views with computed columns Microsoft Dynamics AX 2012 view support in perspectives enables a host of scenarios where multiple tables can be joined to create rich views. The Microsoft Dynamics AX 2012 view framework also provides support for creating computed columns in Microsoft Dynamics AX views. For more information, see “Walkthrough: Add a Computed Column to a View” at http://msdn.microsoft.com/en-us/library/gg845841.aspx.
After you create a cube, users can navigate through the aggregated measures and slice them on the dimensions. This section describes ways that you can expose cube content to users.
However, before discussing the presentation tools, this section examines the jobs that people actually do in an organization to help, you understand the nature of the insights that those people need to do those jobs better.
Table 10-6 lists some options for exposing cube data. Later sections discuss those options in greater detail.
Table 10-6. Ways of exposing cube data to users.
Option | Capability | Author | Additional requirements |
---|---|---|---|
SQL Server Power View | Explore data visually and interactively. Create high-quality presentations with data. | Casual user | Microsoft SharePoint Enterprise edition with SQL Server 2012 |
Excel PivotTables | Analyze data. Slice and dice data by using dimensions. | Power user | SharePoint Enterprise edition with Excel Services |
Build simple scorecards on Role Centers by adding and removing KPIs and measures. | Power user | ||
Reports built by using SQL Server Report Builder v3 (SQL RB3) | Build graphical reports by using aggregate data. | Power user | SQL Server Report Builder, SSRS web parts |
Reports built by using Microsoft Visual Studio tools for Microsoft Dynamics AX | Build parameterized production reports by using aggregate data. | Developer | |
Interactive charts built by using Microsoft Dynamics AX charting controls | Build interactive charts by using aggregate data. | Developer | Microsoft Dynamics AX 2012 R2 |
For the purposes of this discussion, the people in an organization, or personas, are divided into three broad categories: operational, tactical, and strategic.
Operational personas, such as an Accounts Receivable administrator, focus primarily on staying productive and performing day-to-day tasks, such as keeping tabs on receivables.
Tactical personas, such as heads of departments and supervisors, have an additional responsibility as people and resource managers; they need to ensure that their teams function smoothly.
Strategic personas such as chief executive officers (CEOs) need to take a broader corporate view; they tend to operate on established goals and milestones that are evaluated on a wider scale.
Of course, there is an element of operational focus in a tactical persona, and vice versa, but for simplicity, those aspects are not covered here.
Consider a day in the life of an Accounts Receivable (AR) administrator. Like many AR administrators, this administrator is extremely busy at the end of each month (or every Friday, depending on the natural cycle of the business), calling customers and following up on payments. In this case, the AR administrator focuses on exceptions (large payments that are late). If he has more than a few items to work with, he needs a way to prioritize and filter the cases—or even better—see trends within the items at hand. After he identifies a case, he needs to take action and complete the task; for example, he makes a call or sends a note to ensure that the bill is paid.
In this example, insights would help the AR administrator in three areas:
First, he needs to detect exceptions.
Next, he needs to identify clusters, trends, and anomalies.
Finally, he needs to be able to take action.
Of course, real-world AR administrators don’t necessarily follow these steps in succession. But these are three situations where insights need to be applied to help the AR administrator accomplish his daily goals.
Depending on the focus of the persona, different tools and approaches may be necessary.
Table 10-7 shows a list of situations in which each persona requires BI tools to provide insight and suggests presentation tools that would meet the needs of each situation.
Table 10-7. Business objectives and tools by persona.
The tools in Table 10-7 are just suggestions for how you can provide insights to users. However, nothing prevents you from using, for example, the Business Overview web part in a Role Center for an operational persona, or from using cues to display detailed data in a Role Center for a strategic persona. For more information about cues and info parts, see Chapter 5.
SQL Server Power View is an interactive, browser-based data exploration, visualization, and presentation tool for casual users that is included in SQL Server 2012.
Power View can be integrated with Microsoft Dynamics AX in several ways:
Users can use the PowerPivot add-in for Excel to create models and reports that combine Microsoft Dynamics AX data with external data sources. These models are commonly known as data mash-up applications. Microsoft Dynamics AX queries exposed as OData feeds are the best means of consuming data with this approach because OData feeds ensure that Microsoft Dynamics AX security is enforced at the AOS level. With PowerPivot, a user simply assembles the data required for the analysis with the help of a PowerPivot designer. After the data is assembled, the user can browse the data by using Excel PivotTable functionality.
PowerPivot models can be saved to a server running SharePoint Services Enterprise edition. Saved PowerPivot models can be explored with Power View.
As a developer, you can create tabular models by using SQL Server Data Tools, the Visual Studio–based developer tools for creating BI models. When creating tabular models, you can either start from a PowerPivot model created by a user (that is, create a production version of an existing model) or start from scratch. With either approach, you can create a tabular model that consumes data from Microsoft Dynamics AX by means of OData feeds or cubes.
After you develop a tabular model, you deploy it to the SSAS server; however, the server must be configured in tabular mode, not multidimensional mode.
A system administrator can create a Reporting Services data connection file (.rsds file) for tabular mode. After the data connection has been created, users can explore tabular models by using SQL Server Power View.
Embedding an existing Power View report in a Microsoft Dynamics AX Role Center is easy: just use the Page Viewer web part in SharePoint Server, and enter the URL of the Power View report.
Start the Power View report viewer in a browser window, copy the URL for the report (see Figure 10-28), and then paste it into Notepad.
http://vsqlbuvh0301/_layouts/ReportServer/AdHocReportDesigner.aspx?RelativeReportUrl=/Shared%20Documents/Dynamics-SalesbyRegion.rdlx&ViewMode=Presentation&Source=http%3A%2F%2Fvsqlbuvh0301%2FShared%2520Documents%2FForms%2FAllItems%2Easpx&DefaultItemOpen=1
Notice that the first part of the URL contains the path to the Power View designer and the report being viewed in the designer. The remainder is a collection of parameters that are passed to the designer when it is started by the caller.
You can customize the appearance of the Power View window shown in the Role Center by manipulating these parameters. Table 10-8 lists the parameters and describes what they do.
Table 10-8. Power View URL parameters.
Parameter | Description | Suggested value for a Role Center |
---|---|---|
ViewMode | Defines whether the report is displayed in presentation mode or edit mode. | Presentation—Shows the report without edit buttons and the field selection. |
Fit | Defines how the contents of the report fit into the window you have chosen. | True—Hides the frame around the report. |
PreviewBar | Defines whether the preview bar (including Full Screen and Edit buttons) is displayed on the screen. | False—Hides the preview bar. |
AllowEditViewMode | Defines whether the user can edit the report within the window. | False—Makes the report static within the window. |
BackgroundColor | Defines the background color if the report doesn’t fit into the window. (Not applicable if you want the report to fit into the window.) | White—Displays the report in the Role Center without a border. |
If you change the URL by applying the parameter values in Table 10-8, the modified URL looks as follows:
http://vsqlbuvh0301/_layouts/ReportServer/AdHocReportDesigner.aspx?RelativeReportUrl=/Shared%20Documents/Dynamics-SalesbyRegion.rdlx&ViewMode=Presentation&Source=http%3A%2F%2Fvsqlbuvh0300%2FPPSubSite%2FShared%2520Documents%2FForms%2FAllItems%2Easpx&DefaultItemOpen=1&Fit=True&PreviewBar=False&BackgroundColor=White&AllowEditViewMode=False
Now, open the Role Center, and select the option to modify or personalize the page. In Edit mode, select Add Web Part, and the Web Part gallery will appear. Select the Page Viewer web part from the gallery of available web parts, as shown in Figure 10-29.
After you add the web part, specify the URL for the report. You can also provide a friendly title and height and width parameters to suit the window, as shown in Figure 10-30.
Figure 10-31 shows the result. Notice that you can match the color scheme of the Power View report with the color scheme of other reports and charts on the page. This way, users won’t notice a difference between the Power View report and the other charts on the page.
In the previous example, the Edit button and the chrome were disabled because an editing experience in a small window would not be optimal. Also, the capability to edit a report may be beyond the reach of some of the users.
However, you can easily allow users to edit a report by creating a quick link to start Power View in a separate browser window.
To do so, create a new URL quick link by clicking the Add Links option in the Quick Links web part, as shown in Figure 10-32.
In the Add Quick Link dialog box, paste the URL of the Power View report, as shown in Figure 10-33.
You will now see the new quick link added, as shown in Figure 10-34.
Excel is a simple, yet powerful way to share reports with users in Role Centers. For example, you can:
For step-by-step instructions that show how to create a PivotTable by using the prebuilt General ledger cube, see “Walkthrough: Analyzing Cube Data in Excel” at http://msdn.microsoft.com/en-us/library/dd261526.aspx.
Excel Services for SharePoint 2010, in combination with Excel 2010, let you expose charts and PivotTables built by using the Excel Services REST application programming interface (API). The URL that you obtain by using the REST API can be used to display a chart or a table in Role Centers. For more information about Excel Services, see “Excel Services overview” at http://technet.microsoft.com/en-us/library/ee424405.aspx.
The Business Overview web part was introduced in Microsoft Dynamics AX 2009 to display the KPIs in prebuilt cubes in Role Centers. This web part was initially modeled on the KPI List web part in SharePoint Enterprise edition, but it has evolved into a distinct Microsoft Dynamics AX web part in Microsoft Dynamics AX 2012. For example, the Business Overview web part provides Microsoft Dynamics AX user context awareness that is lacking in the generic KPI List web part. KPIs are filtered based on the context of the Microsoft Dynamics AX company and partition (for Microsoft Dynamics AX 2012 R2) when they are shown in Role Centers. Also, when a user changes the Microsoft Dynamics AX language to German, for example, the Business Overview web part can switch the labels for the KPI to German.
If you are familiar with the Business Overview web part from Microsoft Dynamics AX 2009, you know that it had two modes. In Microsoft Dynamics AX 2012 R2, the functionality of these two modes has been divided into separate web parts: the Business Overview web part and the KPI List web part. You no longer have to switch modes. If you want to display KPIs, use the KPI List web part. If you want to display indicators, use the Business Overview web part. The two web parts appear in the SharePoint Web Part gallery), as shown in Figure 10-35.
Both the Business Overview web part and the KPI List web part have some additional features:
You can define multiple filters when displaying a KPI or an indicator. In Microsoft Dynamics AX 2012, you could add a relative time filter only to a KPI displayed in the Business Overview web part.
You can add a Microsoft Dynamics AX menu item or a URL as a drill-through target to a KPI.
You can limit the number of values that are displayed on the screen when splitting a KPI with a given value.
They provide better error handling and graceful exit in case of errors that are caused by cube configuration issues.
The Business Overview web part is extensible. You can create a custom skin for the Business Overview web part and extend its functionality to suit your own business area.
Start the Microsoft Dynamics AX client and then navigate to a Role Center. Note that the example in this section uses a sample Role Center. Select the option to edit the Role Center page. If you are using the Microsoft Dynamics AX Windows client, you are able to personalize the page for yourself only. If you are a developer, customizing the page for everyone, you should start the Microsoft Dynamics AX Enterprise Portal web client and edit the page.
Select Add Web Part. You should see the SharePoint Web Part gallery, as shown in Figure 10-36.
Select the KPI List web part. Click Add. After the web part is added, select Exit Editing. Now you will see the new web part added to the Role Center page.
Click the Add KPIs option to add a new KPI to the web part. You will see an Add KPI dialog box similar to the one in Figure 10-37.
If you are familiar with the Business Overview web part in Microsoft Dynamics AX 2009 or Microsoft Dynamics AX 2012, you will notice several new additions to the Business Overview – Add KPI dialog box (the Add New Indicator dialog box provides similar options).
First, you have an expanded set of options for applying filters. You can add any number of filters—both relative time periods and fixed values. This way, a user can add a filter to an existing KPI definition and display it on his or her Role Center. This feature yields two benefits. You can define a general-purpose KPI definition that applies to the entire organization or the business unit. Users can narrow down the scope of the KPI definition so that it closely matches their area of focus, without developer intervention.
You are probably familiar with the Split option that lets a user display the breakdown of a KPI definition by a selected attribute. For example, the Revenue KPI can be split by sales units so that a sales manager can monitor units that are falling behind. Unlike in Microsoft Dynamics AX 2012, the user can display the top 10 or bottom 10 values, so that the list is not too long.
It was possible to provide a drill-through link to each KPI in Microsoft Dynamics AX 2012, but the picking experience was not user friendly. In Microsoft Dynamics AX 2012 R2, the picking experience has been improved so that the user can associate a Microsoft Dynamics AX menu item or a URL with each KPI.
Notice that the Cube field is already set to a prebuilt cube. In Microsoft Dynamics AX 2012, the Business Overview web part is hardwired to display KPIs from the default cube database. If you want to point the Business Overview web part to a different database, you can specify the database by providing a database connection file; that is, an Open Database Connectivity (ODC) file. For information about how to define an ODC file and add ODC files to Enterprise Portal, see “How to: Create an ODC file for a Business Overview Web Part” at http://msdn.microsoft.com/en-us/library/hh128831.aspx.
The default database is specified in the System Administration > Setup > Business Intelligence > Analysis Services > Analysis Servers form. When you deploy an SSAS project by using the SQL Server Analysis Services Project Wizard, the OLAP database created by this action is added to the list of databases in the Analysis Servers form.
Select an analysis server, and then click the OLAP Databases tab (see Figure 10-38).
The Default check box specifies the default OLAP database used by the Business Overview web part. You can switch the default database by selecting the check box for a different database.
Relative time period filters are shown in the Business Overview web part when you add a KPI or an indicator. However, you can define your own time period filter by using the Time Periods form (System Administration > Setup > Business Intelligence > Analysis Services > Time Periods), as shown in Figure 10-39.
This form lists three types of time periods:
Indicators These define the relative time periods that apply to indicators—the items that you add to the Business Overview web part.
KPI lists These define the relative time periods that apply to KPIs—the items that you add to the KPI List web part.
Period templates These are reusable macros that can be used by both indicator and KPI list entries. Period templates save you from having to recode commonly used patterns repeatedly.
You can define additional indicator and KPI list periods by using MDX code in this form. The Business Overview web part makes these filters available to users at run time.
The following are example definitions to help you understand time period filters.
If the time period definition is a template, you need to modify only the MDX expression in the template.
The CurrentDate period template contains the following MDX expression, which gets the current date from the system:
STRTOMEMBER('[|DateDim|].[Year - Quarter - Month - Week - Date].[Month].&[' + vba!format(vba![date](), 'yyyy-MM-01') + 'T00:00:00]')
Notice the token |DateDim| in the expression. The Business Overview web part replaces this token with the actual name of the date dimension; therefore, you can use this expression with any date dimension.
If you examine the period template definition for CurrentFiscalDate, you will notice another token:
STRTOMEMBER('[|FiscalDateDim|].[Year quarter period month date].[Date].&[|c|]&[' + vba!format(vba![date](), 'yyyy-MM-dd') + 'T00:00:00]')
In this case, the system interprets the token |FiscalDateDim| as a fiscal date dimension. The system identifies a fiscal date dimension by the name given to the dimension. The system interprets the token |c| as the current company.
The definition for the Month_LastMonth indicator uses the template that was discussed in the previous section.
The definition for an indicator contains two MDX expressions that correspond to two time period definitions (see Figure 10-40). The expression that provides the value for the current period is defined in the Current Period MDX field. Because there is already a template for calculating the current month, you can use that definition by referencing the template %CurrentMember%.
The expression that provides the value for the previous period is defined in the Previous Period MDX field. Again, you can use the template already defined and define an expression by using that template.
You will also need to provide a description and a display name for the period definition, as shown in the left pane of the Time Period form. These descriptions and display names appear in the Business Overview web part when the user applies the period filter.
Report Builder is a report development tool that was created with the user in mind. (By contrast, Visual Studio tools for creating reports focus on the developer.) Report Builder features an Office-like ribbon that is familiar to users.
Report Builder 3.0, which was released around the same time as SQL Server 2008 R2, requires SQL Server 2008 R2 or a later version. A new version of Report Builder is included with SQL Server 2012. For an overview of the capabilities of Report Builder, see “Getting Started with Report Builder” at http://technet.microsoft.com/en-us/library/dd220460(SQL.110).aspx.
Earlier versions of Microsoft Dynamics AX provided the capability to generate report models (.smdl files) that could be used to generate reports with Report Builder 1.0. These .smdl models were based on a set of views, called secure views, that were generated on top of the Microsoft Dynamics AX OLTP database.
Microsoft Dynamics AX 2012 no longer generates report models for ad-hoc reporting with Report Builder because Report Builder provides excellent capabilities for creating reports with prebuilt cubes. Also, Microsoft Dynamics AX 2012 cubes provide a good source of aggregate data. For step-by-step instructions about how to use Report Builder with OLAP data, see “Create a report by using SQL Server Report Builder to connect to a cube” at http://msdn.microsoft.com/en-us/library/gg731902.aspx.
Reports developed by using Report Builder are ideal for scenarios in which users require the capability to create reports for their own consumption or for sharing within a group. However, if you want to create an analytic report for broader consumption within the entire organization, you may want to consider using Visual Studio tools.
Reports created with Report Builder have the following drawbacks when used across the organization:
They are developed in only one language. These reports cannot use Microsoft Dynamics AX labels, and they cannot be rendered in other languages.
They do not react to the Microsoft Dynamics AX security model.
They lack debugging capabilities.
They mix datasets from multiple data sources, such as Report Data Providers (RDPs).
Most of the Role Center reports that extract aggregate data are sourced with analytic datasets.
Developing an analytic report is no different from developing a standard Microsoft Dynamics AX report by using Visual Studio tools. You define a report dataset and then create a report design to consume the data. For more information about creating a report, see Chapter 9 and “Walkthrough: Displaying Cube Data in a Report” at http://msdn.microsoft.com/en-us/library/dd252605.aspx.
The remainder of this section examines the salient features of an existing report that consumes analytic data. If you open the AR Administrator Role Center, you will notice the Top Customers by YTD sales report. Start Visual Studio 2010 (the Microsoft Dynamics AX VS reporting tools must be installed).
In Microsoft Dynamics AX Application Explorer, right-click the CustTopCustomersbyYTDSales report, and then click Edit.
Expand the Data Sets node, and then expand the TopCustomersYTDSales dataset.
The report model opens, as shown in Figure 10-40.
The Query property displays the MDX query that was used to retrieve the data. You can click the ellipsis button to open a window where you can modify the MDX query. You can also execute the MDX query from this dialog box (see Figure 10-41).
When you create an analytic report, unless you are an MDX expert, you will probably want to develop the MDX query by using an MDX editor, and then paste it into the Query dialog box.
Notice that the data source is DynamicsAXOLAP, which indicates that the data is sourced from the prebuilt BI solution. To find out which database the data source points to, examine the properties of the Report Datasources node in the AOT, as shown in Figure 10-42.
DynamicsAXOLAP points to the default cubes. This data source is deployed to the SSRS server as a report data source when the report is deployed. If the report was deployed from a development environment, the report points to the development instance of cubes. If the report was deployed from a test instance, it points to the corresponding cube instance.
To examine the properties of the data connection that is deployed to SSRS, locate the connection file DynamicsAXOLAP in SSRS Report Manager, and then open the file. You will see details about the data connection, as shown in Figure 10-43. In a Microsoft Dynamics AX 2012 R2 environment with multiple partitions, the framework resolves the connections at run time.
Notice that Microsoft Dynamics AX has its own data extension to access Microsoft Dynamics AX cubes that are included with Microsoft Dynamics AX 2012.
The section “Add a KPI to the Business Overview web part” earlier in this chapter described how to switch the OLAP database so that the Business Overview web part points to a non-default OLAP database. In that case, you were able to change the SSAS server and the database that were designated as the default server. One important point to remember is that changing the default SSAS database in the Analysis Servers form does not automatically change the default destination of the DynamicsAXOLAP data source that is used for reports.
You can change the data connection by using the following Windows PowerShell command:
Set-AXReportDataSource -DataSourceName DynamicsAXOLAP -ConnectionString "Provider=MSOLAP.4;Integrated Security=SSPI;Persist Security Info=True;Data Source=[SSASServerName];Initial Catalog=[DatabaseName]"
You can also change the connection string in the data connection deployed to the SSRS server by modifying the properties. However, keep in mind that each time you deploy a report, it will be overwritten with the data source connection in the AOT.
If you want to create analytic reports that point to a non-default cube database (for example, a cube database that you create by using the OLAP framework), you must create your own report data source in the AOT. You can use the same Windows PowerShell command that you use to change the data connection. In this case, however, you should provide a new data source name. For more information, see “Set-AXReportDataSource” at http://technet.microsoft.com/EN-US/library/hh580547.