Monday, September 20, 2010

Getting Started with SQL Server Data Mining for Retail/Finance

By Rick Durham

There are two informative, technical webcasts found at this link that cover how SSAS Data Mining is used to solve general retail/marketing problems…

  • “Overview of SQL Server Data Mining”
  • “Applying SQL Server 2005 Data Mining to Enterprise Business Problem”

Here is the URL: http://www.sqlserverdatamining.com/ssdm/Home/Webcasts/tabid/62/Default.aspx

Types of finance/marketing problems that data mining can be used for include:

  • Database marketing applications include offer response, up-sell, cross-sell, and attrition models
  • Financial risk management models attempt to predict monetary events such as credit default, loan prepayment, and insurance claims
  • Fraud detection methods attempt to detect or impede illegal activity involving financial transactions
  • Process monitoring applications detect deviations from the norm in manufacturing, financial, and security processes
  • Pattern detection models are used in applications that range from handwriting analysis to medical diagnostics
  • (please note this is by no means an exhaustive list)

Another good site in terms of general tutorial is this following:

http://www.thearling.com/dmintro/dmintro_frame.htm

Hope this helps get you started!

Thursday, September 9, 2010

Standardize Your MDX Parameter Queries


By Dan Meyers

One thing that I have found useful when writing a lot of Reporting Services reports that have parameters and use MDX is to create some standard calculated members in my cube for the Label and Value properties of the parameters. Just like any other calculated measures that get built into the cube script, you get the advantage of reusing them instead of doing them over and over again in the WITH clause of your query.  The code below is dynamic and is not specific to a particular dimension or anything so it will work with whatever you put on ROWS in your data set query for your report parameters.

Below is the MDX for the calculated members and a sample query.

Insert this code into your cube script (at the bottom)

CREATE MEMBER CURRENTCUBE.[Measures].[ParameterValue] AS
    Axis(1).Item(0).Item(0).Dimension.CurrentMember.UNIQUE_NAME,
VISIBLE = 1;

CREATE MEMBER CURRENTCUBE.[Measures].[ParameterCaption] AS 
    String(Axis(1).Item(0).Item(0).Dimension.CurrentMember.Level.Ordinal * 1 , ' ' ) + Axis(1).Item(0).Item(0).Dimension.CurrentMember.Member_Caption,
VISIBLE = 1;

Sample Query
SELECT
      {[Measures].[ParameterCaption], [Measures].[ParameterValue]} ON 0,
      {[Date].[Calendar].ALLMEMBERS} ON 1
FROM
      [Adventure Works]

image

.

Thursday, September 2, 2010

Interpreting Causation in Time Series Forecast models


By Rick Durham

· Building data mining models is one thing
· Determining the primary factors that contribute to the final predicted data point is quite another

One of the most useful algorithms in the SSAS suite of data mining tools is the Time Series algorithm. Its forecast method is really a combination of two other algorithms (ARIMA, ARTxp) and it takes the historic data values in a series to make future predictions regarding that series. It does this by assigning weights to past data values to make future predictions. One of the most important features of this method is its ability to allow the data from other series in the model to be incorporated in the final prediction values.

For example, in the model below, we can see a direct historic relationship between the price of gas and the price of oil. When the time series algorithm was used to build the model it looked at all of the past data points for both gas and oil to make the final prediction for the price of gas.

We can infer from this model, based on historic data points, that the price of oil affects the price of gas (no big surprise here). Please note the oil price value is normalized against Feb 2008 oil price in %.

image

But what affected oil prices? What caused the huge spike in oil prices July 2008 in our time series forecast? My experience has been that when we create these type models we are always going to be ask what factors caused or drove certain data points in the series to extreme values.

In this case, we might casually answer “ It was a lack of supply in oil with high demand” but this is not true as the following set of historic data charts prove. The chart below shows that in July 2008 production of oil was at an all time high as suppliers were willing increase production when the price point was high. Again no surprise, it’s simple Econ 101.

image

We would think that demand for oil during this period would also be high driving up the price point -but that is not the case. In fact, demand for oil during this period was very low as this historic data chart reveals. It started dropping in 2007 and hit a low in the summer of 2008 when the price of oil and gas were both at all time highs.

image

So how can we explain what was driving the price of oil up and thus the price of gas in July 2008? It turns out that one of the primary factors driving up the price of oil was the value of the dollars value against other currencies. In effect, because the value of the dollar was low oil suppliers wanted more dollars for the same units of oil thus driving up the price.

image

Many types of data that are typically used in time series analysis (think commodities, stock prices, long term weather forecasts…) are driven by complex factors that are often changing and may be non-stationary. The factors that drive a forecast today are not the same as what might be driving it tomorrow. This is what makes understanding what series need to be included in the mining models and what indirect factors drive them tricky.

If we take our oil example, many factors have driven the price around historically. These include: supply, demand, war, strikes, geopolitical tension (or lack of), weather… In some cases, the input factors are so complex and varied that the only way to predict future values is to use the historic time values as there is no way to determine all of the factors that move the data. This is certainly true of the stock market as well.

image

In this blog, I have taken a simple example of time series analysis based on historic oil and gas prices to show how once we have developed our mining model we can potentially dive deeper to understand what factors are driving the forecasts, and ultimately provide better insight to the business. This is the essence of what BI should be about and is often overlooked by technicians who are overly occupied in the complexity of the tools they are using rather than how to use the results they generate to impact the organization.

 

.

Wednesday, August 11, 2010

MDX Tips from BI Conference


By Dan Meyers

Below is a link to a video and the accompanying slide deck for an MDX session that I sat in on at the Microsoft BI Conference in New Orleans. 

 http://www.msteched.com/2010/NorthAmerica/BIE11-INT

He presents a different way to do your time period calculations using a Utility dimension in SSAS.  I think it’s interesting how he has created a hierarchy within the dimension. 

BLOG - MDX Tips

Other MDX samples include moving dates and how to handle time zone differences.

There are some zip files embedded in some of the slides that will give you an XMLA script to create the sample on your laptop or the demo server.

Cheers,

Dan Meyers
Senior Business Intelligence Consultant

Monday, July 26, 2010

Microsoft Based Planning and Budgeting solutions revisited

By Irit Eizips

In January 2009 Microsoft made the announcement that bed farewell to its PerformancePoint Planning initiatives and rolled its Business Intelligence (BI) solution into SharePoint. The common question asked is – Did Microsoft completely abandon the Corporate Performance Management concept?

For those of you who are still unsure what this concept represents and how it differs from Business Intelligence, I offer the following definition: Corporate Performance Management (CPM) is a methodology which helps organizations to forecast, monitor, analyze and react to various business drivers and performance indicators, using improved organizational processes, metrics and software tools. Components of Corporate Performance Management include – scorecards, reports, forecasts, budgets or key performance indicators.

As a CPM consultant currently working for a reputable BI consulting firms, CapstoneBI (oops… “a bit” of a self promotion) , I set out to the Microsoft BI conference in New Orleans (June 2010) to weigh whether one could implement the CPM components successfully using the Microsoft platform.

I specifically looked for Performance Management software systems that leverage the Microsoft platform. Those would typically be sophisticated database applications that are capable of automating and supporting many finance activities – including budgeting, forecasting, business modeling, decision support, strategic planning, and consolidation and reporting – in a single, integrated platform (in this instance, Microsoft’s).

There were three CPM solution booths at the conference, including: deFacto, Prophix and Clarify Systems. Another CPM solution provider I was introduced to by the Microsoft team was Tagetik, the Italian Microsoft partner, who only announced their tool’s integration with Microsoft integration in March 2009. Out of the four, the only Microsoft strategic alliance partner in the CPM space was Clarity Systems (apparently a big deal). To put things in perspective, out of 60 thousand partners, less than twenty are recognized as strategic partners.

Clarity strategic MS partner

All four vendors, use the Microsoft BI stack to fully integrate in providing the capabilities of forecasting and budgeting, consolidation, financial modeling as well as external financial reporting.

On the surface, it appears that Tagetik (the “new kid” on the block”) does a really nice job at integrating with SharePoint, whereas Clarity Systems offers the most comprehensive pre-built templates for the various financial budgeting models. Prophix introduced a nice tool to integrate their solution with SharePoint, whereas deFacto can quickly migrate existing PPS Planning implementations.

The good news is that there are some choices if your company is currently shopping for a budget and planning tool. However, clearly, a tool assessment process would ensure selecting a tool that would meet your business requirements, resource constraints as well as your company’s overall IT strategy. Hey… did I mention that CapstoneBI specializes in helping our clients in that regard?! …

 

Sources: Microsoft BI Conference, New Orleans (6/2010); CFO Research Services (2/2005)

.

Tuesday, July 6, 2010

ProClarity Resources

Hard to find Training, Whitepapers, Webcasts, & Case Studies

By Dan Meyers

Believe it or not, ProClarity is not going away anytime soon. In fact, I have done quite a few demos lately at some rather large companies. In addition to that, I often get asked by clients about online training material which tells me that there are still new people using the product every day. Many people have problems finding this training material because there is not a whole lot of it available on the web anymore. Below is a link to some good resources on the PerformancePoint website (I guess they consider ProClarity a ‘Previous Version’ of PPS).

http://www.microsoft.com/business/performancepoint/productinfo/proclarity/proclarity-overview2.aspx

image

Long live ProClarity!

.

Wednesday, May 12, 2010

T-SQL Fundamentals

Comparing Similar Approaches to Writing Queries

By Dan Meyers

I often get asked by clients about the “best” way to write a query. Whether they should use IN or EXISTS, table variables or temp tables, a LEFT OUTER JOIN or NOT EXISTS, etc… Most often it depends on what your data is like (does it contain NULL values for example), how are your tables indexed, and a number of other things. In order to make the best decision you really need to understand the details and internal workings of the query engine when using the various approaches that are available to you in T-SQL.

Below are some links to some blogs posts that I think do a good job of explaining the details about some of the most common questions I get when working at a client. Most of them are from Gail Shaw and her SQL in the Wild blog. The others are from SQL Server Central.

LEFT OUTER JOIN vs NOT EXISTS
EXISTS vs IN
IN vs INNER JOIN
NOT EXISTS vs NOT IN
Table Variables vs Temp Tables
JOINs - ON clause vs WHERE clause