Sunday, December 20, 2009

Create Top 10 Products Charts and show them inside Account form

In this article I will walk you through the steps to create the Top 10 Products charts and integrate them with the Account form via IFrame.

1. Create a SQL Server Reporting Services report containing the charts. You can download the report using this link. Here are a few things to keep in mind. Because we will be passing the object type code and unique identifier as parameters to the report via IFrame, we need to add those parameters to the report. In addition, I have added the CRM_URL parameter to the report so that a user can click on the bar in the chart to view the selected product in CRM. Please download the report (.rdl) file below for details.

2. Upload the report to the Reports area in Dynamics CRM.

3. Publish the report for external use.


4. Add a tab to the Account form.



5. Add a section on the newly created tab.





6. Add the IFrame to the newly created section as below.
Use the following URL to open the published report from the Report server. Note the rc:Toolbar=false parameter to hide the toolbar. Use the appropriate URL to reflect your server name and report name.






7. Save the form changes and publish your customizations.

8. Open the Account to test your charts. (Note: You may need to create some invoices to test the charts).






Cick on one of the bars on the first chart. You should see the Product form for the product you clicked. You can run the other product related reports from here for further analysis.

Download the report file here.

Monday, September 7, 2009

Key Performance Indicators (KPIs)

In business terminology, a Key Performance Indicator (KPI) is a quantifiable measurement for gauging business performance. For example, a retail business may use “Year over year revenue growth” as a KPI to gauge its performance. KPIs are typically shown as part of a dashboard or business scorecard to provide managers and analysts with at-a-glance picture of the state of business.

Technically KPIs may be implemented using any tool or technology. For example, you may be able to create a dashboard using Excel or SQL Server Reporting Services by retrieving the relevant data from a relational database or even entering the data manually into the spreadsheet and creating necessary calculations or formulas based on the data. However, this approach relies on the KPIs being created consistently by different users and developers, which may not be the case.

There are several advantages of using SQL Server Analysis Services to implement KPIs. First, it enables you to define a KPI once and use it in multiple dashboards and reports in multiple contexts. Second, it ensures that the users see the single version of the truth without you having to rely on the users and developers for the correct calculation.

Let us see how it would work using an example. You can create the “Internet Sales Growth” KPI using the following MDX expression in SSAS:

IIF(
SUM(PeriodsToDate([Date].[Fiscal].[Fiscal Year],
ParallelPeriod([Date].[Fiscal].[Fiscal Year], 1, [Date].[Fiscal].CurrentMember)), [Measures].[Internet Sales Amount]
)=0,
"NA",
SUM(PeriodsToDate([Date].[Fiscal].[Fiscal Year], [Date].[Fiscal].CurrentMember),[Measures].[Internet Sales Amount])/
SUM(PeriodsToDate([Date].[Fiscal].[Fiscal Year],
ParallelPeriod([Date].[Fiscal].[Fiscal Year], 1, [Date].[Fiscal].CurrentMember)), [Measures].[Internet Sales Amount]
) - 1
)

The above expression takes advantage of the MDX function ParallelPeriod to get a member from a prior period in the same relative position as the current member (month, quarter, semester, etc.). For example, a parallel period for FY 2004 Q3 is FY 2003 Q3, which will be used to calculate the year over year sales growth.

Once you have created a calculated measure and a KPI based on this calculation, developers and end users can use it in any spreadsheet, report or dashboard in any context. SSAS calculates the KPI automatically as the users slice and dice the data.

For example, users can use this KPI in any of the following:
- report showing year over year sales growth by territory that displays years across the columns and sales territories down the rows
- dashboard showing querterly sales and sales growth over the same quarter in the previous year by product category
- Excel PivotTable showing top 10 customers by sales that also includes sales growth rates for those customers. When the user slices the data further by product, SSAS automatically calculates the sales growth by customer and product.

Sunday, June 28, 2009

Create browser based Dashboards using Excel Services

In an earlier post, I discussed how you can create free form Excel reports using the cube functions in Excel 2007. This is a great way to create reports, charts, KPIs (Key Performance Indicators) and dashboards using the tool you are already familiar with.

However, you may want to make these reports and dashboards available to a wider audience via a Web browser. You want to enable users to filter the worksheets and charts to suit their needs. You also want to prevent your master Excel workbook from being edited by certain users while allowing only specific users to edit the master workbook. What is the solution?

Welcome to Excel Services! Excel Services is an interactive Web view for spreadsheets - a way for people to see data in their Web browser instead of using Excel. In fact, to look at the report or dashboard in Excel Services, users do not even need Excel installed. However, if they do have Excel installed, they can use the “Open Snapshot in Excel” feature of Excel Services to open the limited version of the workbook data in Excel and use the standard Excel features such as auto sum, formulas and charts for further analysis. However, this does not change the master version of the workbook saved in Excel Services.

In order to make your Excel workbook available in Excel Services, you publish your Excel workbook to Excel Services. To publish workbooks to Excel Services, you need:
  • Excel Services set up with SharePoint Server 2007 Enterprise.
  • A SharePoint site based on SharePoint Server 2007 Enterprise. This is where you can save your workbooks, and where others can see your workbook data by using their Web browsers.
  • Excel 2007 installed on computers through one of the following: Office Professional Plus 2007, Office Enterprise 2007, or Office Ultimate 2007.
Again, to look at a worksheet in Excel Services, users don't need Excel installed at all. All they need is a Web browser.

If you would like to learn how to set up Excel Services and publish an Excel workbook to Excel Services, there is a good tutorial available here.