Customize cubes [AX 2012]

This post related to this post [Customizing the prebuilt BI solution]
Figure below shows the process for updating a cube. This post walk through each step in detail.
Choose the project to update
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.

Select metadata
Next, you select the Microsoft Dynamics AX metadata that you want to include or exclude, as shown in Figure below. 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 Metadata will be covered later in post with title “Creating cubes”.
Select financial dimensions
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 below
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.

Select calendars
Next, the wizard prompts you to select the calendars to include as date dimensions, as shown in Figure below. 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 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.
Select languages
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 below.
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.
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.
Add support for currency conversion
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 below
Note 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.
Confirm your changes
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 below
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.
Save the updated projectNext, 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.

Deploy and process cubes Next, you can deploy the cubes to an SSAS server and, optionally, process the cubes. As discussed in the ”Deploy cubes” in another post before “ Customizing the prebuilt BI solution”, in a multiple-partition environment in Microsoft Dynamics AX 2012 R2, the system will deploy the project to multiple SSAS databases.

No comments:

Post a Comment