Professional Documents
Culture Documents
Table of Contents
Introduction ................................................................................................ 3
Terminology ................................................................................................ 4
KPI walkthrough ......................................................................................... 9
Description of KPI example .................................................................................................... 9
Step-by-step ........................................................................................................................ 9
2
TRACING DYNAMICS AX 2009 ROLE CENTER KPIS
Introduction
The prominent place of key performance indicators (KPIs) in Microsoft Dynamics AX 2009 Role Center
pages has prompted questions about where the KPI data is drawn from. This document explains how
to trace the data displayed in a KPI to its source in the Microsoft Dynamics AX online transaction
processing (OLTP) database.
Microsoft Dynamics AX relies on SQL Server Analysis Services (SSAS) for its business intelligence
processing. In the following sections, we define terms of importance for SSAS, and then provide an
example of how to trace the data for a KPI on a Role Center page.
3
TRACING DYNAMICS AX 2009 ROLE CENTER KPIS
Terminology
Key Performance Indicator (KPI)
A Key Performance Indicator is a measurement for gauging business success, or, in other words, a
measure of business metrics against targets. For example, a Sales Amount KPI could show sales
from the last quarter and display a green icon if you are at budget, yellow if you are within 5% of
budget, and red if you are under 5% of budget.
Online Analytical Processing (OLAP)
OLAP systems (such as that supported by SSAS) aggregate and store data at various levels across
various categories.
Facts
Facts are predominantly numeric measurements, such as price or quantity, and represent the key
business metrics that you want to aggregate and analyze. Facts form the basis of calculations, and
you often aggregate them for members of a dimension.
Dimensions
Dimensions form the contexts for the facts, and define the aspects of a business by which the
facts are aggregated. For example, Items could be a dimension, while Price and Quantity could be
facts of that dimension.
Data source
A data source stores the connection information for an SSAS project and/or database. With
Microsoft Dynamics AX, the project or OLAP database that you create has a data source that
points to your Microsoft Dynamics AX OLTP database.
Data source view
A data source view contains the logical model of the schema used by an SSAS database object.
Data source views can filter, apply calculations, and create joins on objects in the data source. In
the OLAP database that Microsoft Dynamics AX creates, most of the data source views are simply
views of a specific table, though some views may include a SQL statement that contains filters,
calculations, or joins.
Measures
A measure represents a column that contains quantifiable data, usually numeric, that can be
aggregated. A measure is generally mapped to a column in a fact table. An example of a measure
would be Sales Amount or Cost of Goods Sold (COGS).
Cube
Cubes store summarized fact and dimension data in structures that are multidimensional (that is,
containing more than the two dimensions found in spreadsheets and normal database tables).
Dimensions define the structure of the cube, and measures provide the numeric values of interest
to an end user.
Microsoft Dynamics AX 2009 ships with the following 10 default cubes:
Accounts Receivable
General Ledger
Production
Project Accounting
Purchase
4
Sales
Expense Management
Accounts payable
5
TRACING DYNAMICS AX 2009 ROLE CENTER KPIS
6
TRACING DYNAMICS AX 2009 ROLE CENTER KPIS
7
TRACING DYNAMICS AX 2009 ROLE CENTER KPIS
8
TRACING DYNAMICS AX 2009 ROLE CENTER KPIS
KPI walkthrough
Description of KPI example
This section walks you through an example of how to determine the origin of KPI values. We will use
screen shots as needed to illustrate procedures.
Scenario: Your CEO views her Role Center and wants to know where the numbers for the Production
Cost KPI are coming from.
Step-by-step
1. In the Microsoft Dynamics AX client, go to the User profiles form (Administration >
Setup > User profiles). On the form find and select CEO in the Profile ID column and
then click the View Role Center button.
2. For the Production KPIs click the Manage KPIs link.
3.
Click the edit button on Production cost (the pencil icon). It will tell you that this is
pulling from the Production Cube and the Production Cost KPI.
9
TRACING DYNAMICS AX 2009 ROLE CENTER KPIS
4.
5.
6.
To look at the KPI open SQL Server Business Intelligence Development Studio (BIDS). If
you are running SQL Server 2005, BIDS can be found at Start > All Programs >
Microsoft SQL Server 2005 > SQL Server Business Intelligence Development
Studio. If you are running SQL Server 2008, BIDS can be found at Start > All Programs
> Microsoft SQL Server 2008 > SQL Server Business Intelligence Development
Studio.
Open your OLAP database (File > Open > Analysis Services Database).
On the Connect To Database form, select Connect to existing database. Enter the
name of the SQL Server Analysis Services Server in the Server field. In the Database
field, enter Dynamics AX.
Note: By default your OLAP database is named Dynamics AX. If you have applied a
different name, use that name for Dynamics AX in the step above.
10
TRACING DYNAMICS AX 2009 ROLE CENTER KPIS
7.
Open the Production cube in the Solution Explorer section of BIDS. Find Production
Cube, right-click, and select Open.
8.
9. In the KPI Organizer, click the Production Cost KPI to open its setup form.
10. The Value Expression section tells you what data the KPI is displaying.
11
TRACING DYNAMICS AX 2009 ROLE CENTER KPIS
12. You will see in the Expression section it is doing the following:
IF(
ISEMPTY([Measures].[Cost of Planned Consumption]) OR [Measures].[Cost of
Planned Consumption] = 0,
NULL,
([Measures].[Cost of Actual Consumption] / [Measures].[Cost of Planned
Consumption]) * 100
)
13. If we break the above statement down we see that the first part is:
[Measures].[Cost of Planned Consumption] OR [Measures].[Cost of Planned
Consumption] = 0, NULL
What this tells us is that if these values return zero we will report null, otherwise we will
do the calculation on the next line. First we need to find out if the above statement would
return a zero, as shown in the following steps.
12
TRACING DYNAMICS AX 2009 ROLE CENTER KPIS
14. Begin with the first part of the MDX query, [Measures].[Cost of Planned
Consumption]. On the Calculations tab you should see that Cost of Planned
Consumption breaks down to the following:
[Measures].[Planned Cost Amount] + [Measures].[Planned Cost Markup]
15. The Planned Cost Amount is another calculated measure that does the following:
([Measures].[Cost amount], [Production Level].[Level].&[1])
16. Cost amount is not a calculated measure, so we go back to the Cube Structure tab and
in the Measures pane find CostCalcuation > Cost amount.
13
TRACING DYNAMICS AX 2009 ROLE CENTER KPIS
18. Expand Source, then expand Source again. The TableID is PRODCALCTRANS and the
ColumnID is COSTAMOUNT.
19. To verify where the data is pulled from, go to the Solution Explorer and right-click
Dynamics AX under Data Source Views. Select Open.
14
TRACING DYNAMICS AX 2009 ROLE CENTER KPIS
20. On the Dynamics AX data source view tab, find PRODCALCTRANS under Tables.
22. If you didnt have an Edit Named Query option, it would mean the data was being pulled
the PRODCALCTRANS table using the following select statement:
select costamount from prodcalctrans
15
TRACING DYNAMICS AX 2009 ROLE CENTER KPIS
However, since this is a named query, we need to find where the COSTAMOUNT column is
coming from. To do this, look through the column labeled Column, find COSTAMOUNT,
and then look at the Table column to see the source table.
23. We see that the COSTAMOUNT column is pulling data from the PRODCALCTRANS table.
The SQL statement would be:
select costamount from prodcalctrans
16
TRACING DYNAMICS AX 2009 ROLE CENTER KPIS
24. Now we need to trace the second part of the calculated measure, which is [Production
Level].[Level].&[1]. Find Production level in the Hierarchies tab under
Dimensions. Expand Production level and then click Edit Production Level.
25. The Production Level hierarchy should appear under Production Level. Right click Level
and select Properties.
17
TRACING DYNAMICS AX 2009 ROLE CENTER KPIS
26. In the Properties window, expand NameColumn and then expand Source. The source
TableID is PRODCALCTRANS_LEVEL and the ColumnID is COLLECTREFLEVEL.
27. We now know the data source that OLAP is using, but we want to find out where data is
being pulled from in the Microsoft Dynamics AX OLTP database. To do this we can open
the Dynamics AX option under Data Source Views in Solution Explorer.
18
TRACING DYNAMICS AX 2009 ROLE CENTER KPIS
19
TRACING DYNAMICS AX 2009 ROLE CENTER KPIS
20
TRACING DYNAMICS AX 2009 ROLE CENTER KPIS
30. We now have enough information to build a SQL statement that would reflect the OLAP
query we saw in step 24 ([Production Level].[Level].&[1]). Adding the level of 1
from the end of the statement yields the SQL statement:
select * from prodcalctrans where collectreflevel=1
21
TRACING DYNAMICS AX 2009 ROLE CENTER KPIS
32. Now return to the second part of the MDX query [Measures].[Planned Cost Markup]
from step 14.
On the Calculations tab, find Planned Cost Markup. We see that this calculated
measure is defined by
([Measures].[Cost Markup], [Production Level].[Level].&[1])
33. On the Cube Structure tab, navigate to CostCalcuation and then to Cost Markup.
22
TRACING DYNAMICS AX 2009 ROLE CENTER KPIS
35. In the Properties window, expand Source and then Source again. The displayed
TableID is PRODCALCTRANS and the ColumnID is COSTMARKUP.
36. Return to the Data Source View and look at PRODCALCTRANS and the Cost Markup
column (as in steps 20 through 23). The SQL statement turns out to be:
select costmarkup from prodcalctrans
37. We already found the SQL for production level.level &1 in steps 24-30. Combining
that with COSTMARKUP yields:
select sum (costmarkup) from prodcalctrans where collectreflevel=1
38. Now you can take the sum of COSTAMOUNT and COSTMARKUP (using the results from
steps 31 and 37) where collectionreflevel=1. If that value is zero, then the KPI is null.
39. If the value is not zero, then we continue tracing the KPI using the second part of the
statement from step 12:
[Measures].[Cost of Actual Consumption] / [Measures].[Cost of Planned
Consumption]) * 100
23
TRACING DYNAMICS AX 2009 ROLE CENTER KPIS
40. The Cost of Actual Consumption is a calculated measure that has the following
expression:
[Measures].[Realized Cost Amount] + [Measures].[Realized Cost Adjustment]
41. In the first part of the statement, the Realized Cost Amount measure is:
([Measures].[Actual cost amount], [Production Level].[Level].&[1])
24
TRACING DYNAMICS AX 2009 ROLE CENTER KPIS
42. Now look up the Actual cost amount measure. To find this measure, go back to the
Cube Structure tab and find Actual cost amount under CostCalculation.
43. If we look at the properties of Actual cost amount we find that the source TableID is
PRODCALCTRANS and the ColumnID is REALCOSTAMOUNT.
25
TRACING DYNAMICS AX 2009 ROLE CENTER KPIS
If we add the production level of 1 (which we already found in steps 24 to 30) the SQL
statement for all of step 41 is:
select sum (realcostamount) from prodcalctrans where collectreflevel=1
45. Go back to step 40 and look at the second part of the statement
[Measures].[Realized Cost Adjustment]
Realized Cost Adjustment is a calculated measure equivalent to:
([Measures].[RealCostAdjustment], [Production Level].[Level].&[1])
26
TRACING DYNAMICS AX 2009 ROLE CENTER KPIS
46. The source of RealCostAdjustment can be found by going back to the Cube Structure
tab and finding RealCostAdjustment under CostCalculation.
47. If we look at the properties of RealCostAdjustment, we find that the source TableID is
PRODCALCTRANS and the ColumnID is REALCOSTADJUSTMENT. Adding the production
level of 1, we would see a SQL statement such as:
select sum(realcostadjustment) from prodcalctrans where collectreflevel=1
48. To derive Cost of Actual Consumption, we would add the results of steps 44 and 47.
49. Next we trace the second part of the statement from step 39:
[Measures].[Cost of Planned Consumption]
27
TRACING DYNAMICS AX 2009 ROLE CENTER KPIS
28
TRACING DYNAMICS AX 2009 ROLE CENTER KPIS
51. To find [Measures].[Cost amount], go back to the Cube Structure tab and find Cost
amount under CostCalculation.
52. If we look at the properties of Cost amount, we find that the source TableID is
PRODCALCTRANS and the ColumnID is COSTAMOUNT. Adding the production level of 1, we
would see the SQL statement:
select sum (costamount) from prodcalctrans where collectreflevel=1
29
TRACING DYNAMICS AX 2009 ROLE CENTER KPIS
54. To trace this measure, go back to the Cube Structure tab and find Cost Markup under
CostCalculation.
30
TRACING DYNAMICS AX 2009 ROLE CENTER KPIS
55. If we look at the properties of Cost Markup, we find that the source TableID is
PRODCALCTRANS and the ColumnID is COSTMARKUP. Adding the production level of 1,
we see the SQL statement:
select sum (costmarkup) from prodcalctrans where collectreflevel=1
56. The results for [Measures].[Cost of Planned Consumption] would be the sum of steps 52
and 55.
57. Therefore, the results for [Measures].[Cost of Actual Consumption] / [Measures].[Cost of
Planned Consumption]) * 100 This means we have to divide the results from step 48 by
the results of step 56. Then we take that number and multiply it by 100 to get our actual
vs. planned consumption which is what gives us the Production Cost KPI.
After following these steps you should now know where the data that makes up the Production Cost
figure on the KPI is coming from. You should also have learned how to trace a KPI so that you can
determine where any KPI is pulling data from.
References:
The information above was taken from SQL Server books online. For more information on
SSAS please go to http://msdn.microsoft.com/en-us/library/ms130214.aspx
31
TRACING DYNAMICS AX 2009 ROLE CENTER KPIS
Microsoft Dynamics is a line of integrated, adaptable business management solutions that enables you and your
people to make business decisions with greater confidence. Microsoft Dynamics works like and with familiar
Microsoft software, automating and streamlining financial, customer relationship and supply chain processes in a
way that helps you drive business success.
U.S. and Canada Toll Free 1-888-477-7989
Worldwide +1-701-281-6500
www.microsoft.com/dynamics
This document is provided as-is. Information and views expressed in this document, including URL and other Internet Web site
references, may change without notice. You bear the risk of using it.
Some examples depicted herein are provided for illustration only and are fictitious. No real association or connection is intended or
should be inferred.
This document does not provide you with any legal rights to any intellectual property in any Microsoft product. You may copy and
use this document for your internal, reference purposes. You may modify this document for your internal, reference purposes.
2009 Microsoft Corporation. All rights reserved.
32
TRACING DYNAMICS AX 2009 ROLE CENTER KPIS