Nick Barclay: BI-Lingual

Speaking the language of business intelligence with a Microsoft accent

Monday, November 16, 2009

How believable are paid evangelists, anyway?

Many of you may know Don Dodge - he’s a start up and technology evangelist who, up until a day ago, worked for Microsoft. Apparently Don was part of the most recent round of layoffs. He was immediately snapped up by Google. Good for them.

The funny thing here is the contents of Don’s Thanks Microsoft, Hello Google post. While he’s completely entitled to his opinions, I am amazed at how quickly they changed. It really made me wonder just how much of an evangelist’s passion is determined by who signs their paycheck. As usual, Fake Steve Jobs provides analysis as only he can.

Friday, November 13, 2009

Who let the Bulldog out?

bulldog

‘member what happened when Microsoft said “Hey, let’s bundle a reporting engine into the SQL Server license”, “Hey let’s bundle an OLAP engine into the SQL Server license”, “Hey let’s bundle an ETL engine into the SQL Server license”? Well, they’re doing it again.

The other day I downloaded and installed the latest CTP of SQL Server 2008 R2. Although there are plenty of good things to talk about in this release the one that really interests me (and many others) is Master Data Services or MDS, originally codenamed “Bulldog”. Once again Microsoft is being disruptive by bundling yet another <InsertNameHere> Services product into the SQL Server stack.

MDM is Enterprise only. Not for long…

In its magic quadrants, Gartner splits analysis of Master Data vendors into Customer and Product master data categories. Their analysis of MDM players contains vendors that are very much enterprise focused and don’t sell huge volumes of licenses. Many of these vendors reference Fortune 500 companies as their customers. This reinforced by belief that MDM is very much an enterprise only playground. The license and maintenance revenue from small volumes of customers is enough to sustain these vendors’ business models. Translation: big license fees & big maintenance fees. I’m sure the products are worth every penny, but not every business can justify spending big money on buying and implementing MDM.

Companies that deal with hundreds of thousands, or even millions, of different SKUs or unique customers need a way to manage that one version of the truth for their incredibly large and complex global businesses. This is fine for those that can justify spending the amount of money needed to accomplish this, but what about the company with just 500 SKUs and 10,000 customers? They may still have tons of money, hell they my even be Fortune 500, but they may not have mountains of master data records to manage. Even the most cashed up companies would think twice about spending vast sums of money on ways to manage small volumes of critical master data. IMO the enterprise vendors are not interested in these companies and these companies are not interested in enterprise vendors.

Enter MDS. Cost? Included in SQL Server license.

The Incumbents

I’m sure the established players in the MDM space are snickering behind their hands at Microsoft’s audacity in trying to muscle in on the MDM market. They’re already hard at work compiling comprehensive lists of “but does it have…?”, “can it do…?”, “it can’t…” and the ever-popular “C’mon, it’s Microsoft! Wait ‘till SP1 comes out.”

To be sure, there are plenty of good reasons the incumbents have as to why MDS may pale in comparison to their own technology stack. There is no question that MDS will be playing catch up here. Most of the others have been in business a long time and have excellent, very mature products. No argument there. Keep in mind, though, that MDS is also based on a pretty mature MDM product, Stratature, that was acquired by Microsoft in 2007. Nonetheless I’m sure there will not be as many features baked into MDS v1 when compared with the other market players.

The incumbents are focused on the big enterprise fish who have nasty, hairy, complicated master data problems that need to be solved. Of course, that’s their target market. These are the customers who will can (and want to) pay for what the incumbents have to offer. No doubt it’s good stuff, but what about the business who just wants a central place to manage the names and hierarchies of their 100-ish sales territories and their exclusive list of 2,000 customers? Do they need all the enterprise MDM bells, whistles and cost? Probably not. They’ve been making do with Excel. Until now.

Got Lookup Tables?

Raise your hand if you’ve ever created a lookup table that had to be maintained or watched over by someone who is umm, not so technical. If you suggested forking out a large pile of cash to purchase MDM software to assist this non-technical person maintain proper control of small volumes of simple data you were probably laughed at.

“Do it in Excel”, “Create a table in a DB and build a UI for maintenance”, “Use Access…”. These are the thin-end-of-the-wedge scenarios that will allow MDS to gain footholds in places that the other vendors would not even get out of bed for. Like Analysis Services and Reporting Services the barriers of entry for the IT geeks to start playing around with and eventually deploying MDM into production will be drastically lowered.

Don’t get me wrong, there’s still going to be plenty of big, complex enterprise MDM scenarios that MDS will tackle as well. *But* (I think) there is going to be a whole new breed of non-enterprise MDM customer that will start making themselves known very soon.

The 4 P’s of MDM

When you start looking into the world of MDM one of the first things you quickly realize is that the software, while critical to the process, is not even close to the complete solution. Anyone who has been involved with an MDM project will tell you that while good software definitely helps, the real success of a master data initiative is inexorably linked to all of the 4 P’s of MDM:

  • Processes
  • People
  • Politics
  • Product

Notice that product only makes up 25% of this. Figuring out the technicalities how to use MDS is not going to be much of a chore for most BI / IT pros. The real challenge is getting the other 75% of the 4 P’s in place.

MDS, as part of the SQL stack, frees up funds to spend on getting all four P’s right. There is reasonable about of consulting hours that can be purchased with the money saved when you don’t see any increase in SW license costs.

What’s under the hood?

As I get stuck into the internals of the product I will blog more. From what I’ve toyed around with so far the product looks interesting, is simple to set up, and should be pretty easy for both geeks (getting stuck into the DB, web services and API) and the non-geeks (who will use the web-based UI to manage things) to get a handle on. On digging into some of the more complex looking objects within the repository DB and web-based UI you can see that there is a lot of good stuff to explore and experiment with.

Jamie Thompson blogged about his delight in discovering that MDS implements some very cool Regex and Fuzzy lookup functionality. I’m sure Jamie’s next question was whether there are any MDS-flavored custom SSIS transforms or tasks included in the initial release. I asked the same question. Answer: There aren’t any. Yet. The group PM for MDS is Kirk Haselden, you may remember Kirk from such products as SSIS where was the dev manager and one of the product’s primary designers. With Kirk’s involvement you can be pretty damn sure there will be some SSIS goodness that will make its way into MDS at some point in the foreseeable future. For now, though, you can interact with data via the MDS web service, API or just plain ‘ol TSQL. Plenty of options there for SSIS to hook into. More on this as I play around with the product.

Final Thoughts

MDS will go head-to-head with the established enterprise MDM players, no question. In the short term the product will probably not make much headway in that market, though. No surprises there. However, think of what the potential is for businesses that the big vendors don’t care about right now. Those who own SQL Server licenses and have even the smallest requirement for managed master data are all fair game.

Thursday, November 5, 2009

PerformancePoint Services - What’s Deprecated

Continuing on from the What’s New and What’s Changed / Improved / Different posts, here are some of the things that will be going away in PerformancePoint Services.

OWC Support

No more OWC-based PivotCharts, PivotTables, Trend Charts and  Excel Spreadsheets. Good.

ASP.NET Dashboard Preview Site

One of my favorite features of PPS 2007 is now gone. Because the storage and management of elements are now almost entirely MOSS based you will need a complete installation of MOSS 2010 to be able to play with the new stuff. The silver lining here is that MOSS 2010 will be supported in a Developer configuration on Vista and Win7 PCs. So now developers will be able run their own sandbox environment locally.

Support for SSAS 2000 databases

Anyone who still has an SSAS 2000 DB running in production ought to be ashamed of themselves.

ODBC Tabular Data Sources

ODBC data sources were a rarely used feature of PPS 2007, and BSM for that matter. Although you could connect to just about any data source you wanted to, you could only bring return a scalar value per data source element which made these data source types tedious and of little real value.

32 bit Architecture

Because PPS is now part of the MOSS 2010 furniture it goes without saying that it only supported on 64 bit platforms. Hello better scalability.

PerformancePoint Services - What’s Changed / Improved / Different

Continuing on from the What’s New post, here are some of the changes and improvements to the product. This post covers some of the more subtle changes and improvements to the product. You could argue that some of these belong in the “what’s new” post, but let’s not split hairs here.

Again this is by no means an exhaustive list, but I think I’ve got most of major ones in here. As before I’d love to include screenshots but cannot because they’re from the Beta 1 build and MS have asked me not to include these. Beta 2 should hopefully be out some time this month.

Analytic Charts & Grids

The overall improvements to the Analytic report engine both from a designer and end user perspective continues to get better. Here are some of the major improvements.

Improved chrome - Charts now look shinier. Like pie charts this is something that many users will appreciate but doesn’t really add any significant analytical value. Nonetheless pretty things tend to impress some users.

Select measures - Users can add or remove individual measures from chart or grid using a set of checkboxes.

Interactive chart labels - In PPS 2007 the graphical elements themselves i.e. the bars or lines within the graphs were the interactive parts. The labels on the X and Y axes of graphs can now also be right-clicked to expose interactive functionality too.

Filtering - Top / Bottom N filtering capabilities are available for both end users and developers.

SSAS cell formatting surfaced - Cube-based cell formats will be brought through and displayed in analytic grids. [Big round of applause]

Per measure formatting – The format of individual members can be altered in the designer. Nice feature but because the analytic reports are pulling data from a cube the formats should be correctly applied therein to begin with.

No more design time browse button - In order to test the interactivity of a particular analytic report there is no need to launch a separate window via the Browse button. Designers can interact with the charts and grids directly.

Better cube object browser experience - The cube metadata in the Details Browser is properly organized in the way we are used to within SSMS, Excel and others. Dimension attributes, attribute hierarchies and folders are grouped within their parent dimension containers. You can also filter the content of the pane for a specific measure group.

Scorecards

In general there are several new interactivity & layout capabilities that have made their way into scorecards. I haven’t had much of a chance to explore the changes to this element fully. Suffice it to say that there will be more opportunities for people to try and make scorecards into reports by treating the scorecard element as a pivot table and then being disappointed when it doesn’t deliver the exact functionality they expect. Hopefully the new scorecard power will be used with appropriate responsibility.

Dynamic dimensional axes – scorecards support user interactivity with dimension hierarchies. In PPS 2007 you had to add individual members or sets and craft the axis hierarchy by hand. Now you can add, say, the All member of the Product Categories hierarchy and you will have full interactive access to all its descendants within the scorecard.

New target metric display settings - have a new set of dialogs with several new options including the ability to calculate and display the variance between the target and its associated actual. You can also configure the variance calculation to show either a Percentage of Variance or just a number. Within the Percentage of variance there is an option to show either a Difference from value or Progress toward value.

Data Sources

Security per data source element - This is a really good one. Security context can now be configured on each individual data source element. In PPS 2007 data source security was a server level setting and was a source of many questions in the PPS forum. In the latest version you can choose what security scenario you’d like to apply to each data source definition within Dashboard Designer. The two primary methods being the use of the Unattended Service Account or Per-User Security. The only difference between the SSAS and Tabular data source configuration options respect is the SSAS data sources offer the ability to make use the CustomData connection string property as well.

KPIs

Multiple actuals per KPI – You can now create more than one Actual within an individual KPI. This one sounds trivial but it’s not, it opens up the door to much richer KPIs. BSM and PPS 2007 supported exactly one actual metric per KPI. Because you can now have more than one actual the designer provides the ability to link each target metric to the appropriate actual metric.

Metric cloning - When configuring the data source of a specific metric you can point towards another metric and clone its settings. So you’ve already created a metric that has a data source, calculation or setting that you want to clone you can point the data source property of your new metric to the existing metric. Under the covers Dashboard Designer copies the settings of the target metric into your new metric. A nice time saver. Note however that this is a one time clone of settings, the element definitions will not remain synced thereafter.

Calculated metrics – When configuring the data source property of a metric there are some new dialogs to help configure calculations. Using them you can create calculations that reference other KPI metrics. Some pre-built calculation will be available such as Growth as Percentage, all you need to do is fill in the formula to reference the appropriate metrics. The PPS team posted some details on this new feature the other day. This may come in handy for KPIs that source metric data from different places. On the other hand, if your KPI sources data from a single cube these kind of calculations should be baked into the cube itself whenever possible.

Time Intelligence Formulas

Two new functions have been added to the STPS. They are the <PeriodName>ToDate and the Full<PeriodName> functions. They have been created to enable better period-to-date functionality. But couldn’t we already to that kind of stuff with the original PPS TI formulas? Sort of. If you wanted to do a YTD using PPS 2007’s TI functionality you would define a range of values with an STPS formula. This would return a set of appropriate period members. For example Year.FirstMonth : Year.Month would return a set of month members from Jan-Nov for the current year. This was great if you wanted to apply the set of members across a scorecard or report axis but it did not help if you wanted to do something like provide a YTD column on a Scorecard using TI. The new functions fill that need. When used together the …ToDate and Full… functions return an aggregation object of sorts as opposed to a set of members. For example the STPS formula YearToDate.FullMonth returns a TI aggregation object for the year-to-date value up to the last full month. QuarterToDate.FullDaty returns an aggregation object for the current quarter up to the last full day.

PerformancePoint Services - What’s New

Now that the NDA has been lifted it’s time to start talking about PerformancePoint Services. I plan to expand on many of these points in upcoming posts. For now I’ve put together a series of summary posts on some of the things that are

There is plenty to talk about in the new release, these lists are by no means comprehensive in their coverage of PerformancePoint Services. I also expect that the PPS team has a whole stack of useful posts loaded and ready to go, so keep and eye on their blog for a lot of new information in the near future.

UPDATE: Here is a detailed post from the PPS team (including screenshots) about all the new stuff

I wish I could provide screenshots of all that is contained in these posts but I am unable to post shots of Beta 1. More visuals will come as Beta 2 is released.

SharePoint Integration

OK, we all know this one, PerformancePoint Services is now part of the Enterprise CAL of MOSS 2010, it is no longer a separate product. Element definitions are stored and managed within SharePoint lists and libraries and will be recognized as first class citizens in the MOSS world. This is going to bring a number of advantages in the MOSS 2010 world and will be the subject of quite a few posts in the future. Lots to talk about here.

Unfortunately, the MOSS integration strategy that was announced in January this year seems to have taken a big slice of the dev team’s time and hence the amount of new and changed features in PPS are not huge in number. That being said I do not want to trivialize the time and effort that went into the MOSS integration of PPS. The benefits of this re-architecture effort will make themselves known as we all begin to explore the new MOSS platform and all the other BI goodness (outside of PPS) that is baked into it.

The 7th Element: Filters

Filters are now an element unto themselves. In PPS 2007 filters were part of dashboard element definitions and therefore could not be shared. In PPS 2010, if you’ve built a useful filter you can share it with all of your dashboards just as you would any of the other elements. This is a welcome architectural change that many were hoping for (not sure whether this really falls under the “new” category…).

The filter types that are available to us and their functionality have not changed very much in this release, they’re just a separate element now. With this new architectural change many will ask whether this means that we can pass values from one filter to another i.e. cascading filters. The answer: no, not yet. I wouldn’t be surprised if this feature was one that got cut in lieu of time required for the MOSS integration work.

Decomposition Tree Drilldown

I’ve always liked the ProClarity’s decomp tree and am really glad to see this new Silverlight-based version as part of drilldown interactivity within analytic reports. The decomp is not a report type unto itself but a “Analyze > Decomposition Tree” option from the right-click menu within the analytic chart and grid reports. Unfortunately the decomp tree is about the only recognizable ProClarity bit that made it into this release.

New Chart Type: Pie Charts (groan)

One of the things I liked about PPS 2007 was the fact that Analytic reports didn’t support pie charts. I think this was a feature that the MS sales team had a hand in. If you, or anyone you know, still believe that pie chart has any real analytical value please refer yourself (or the people you know) to Stephen Few’s excellent Save the Pies for Dessert whitepaper. If after reading it you still think pie charts are worth using on a dashboard then there is no hope for you.

KPI Details Report

As its name suggests this report supplies all the details about a particular KPI. This is a welcome addition. It’s a simple display of KPI metadata that can be hooked to any scorecard. Clicking on a KPI within the related scorecard will display its information in this report. When configuring the report you can choose which pieces of KPI metadata to display.

The lack of this feature in PPS 2007 was one of the driving reasons behind why I built the MAUDF project a while back; to provide simpler access to this kind of data. My customers wanted to see banding thresholds, descriptions and other metadata pertaining to a KPI. The new report does all of this.

Monday, October 26, 2009

Un-cooking the books with Benford’s Law

So, if you take a set of real life numeric data (e.g. sales figures, customer sat scores, baseball game attendance figures) stripped the first digit off each number and counted those up what would the distribution of numbers be? i.e  how many 7s would there be? How many 2s? Would there be a pattern to the distribution? The answer is actually yes. It’s known to many number crunchers as Benford’s Law.

Here's the Wikipedia definition: Benford's law, also called the first-digit law, states that in lists of numbers from many (but not all) real-life sources of data, the leading digit is distributed in a specific, non-uniform way. According to this law, the first digit is 1 almost one third of the time, and larger digits occur as the leading digit with lower and lower frequency, to the point where 9 as a first digit occurs less than one time in twenty.

Basically the law means that in many real-life (i.e. non-made-up or random) data the distribution of the first digit in a series of numbers will often look very similar to the graph below (also from Wikipedia).

Benford GraphMy CPA brother-in-law refers to “running the Benfords” when on auditing gigs in order to perform a quick acid test on pertinent sets of numbers to see if there is something that warrants further investigation. If the distribution doesn’t look similar to the graph above then he looks a little closer; maybe someone’s been cooking the books.

As DBAs, BI pros (and maybe some former accountants) we have plenty of real world data at our fingertips. Why not test Mr. Benford out to see if our data conforms. Benford’s law states that the data has to be real-life so let’s test it by applying the theory to three different data sets:

  • Randomly generated numbers
  • Made up numbers (AdventureWorksDW2008 sales figures)
  • Real data from a real life data source

 

 

 

 

Random Numbers

I’ve created a simple script to create set of randomly generated numbers and perform a basic Benford analysis of the results. Here’s what it does:

  1. Creates and populates a table variable with 65,536 random numbers
  2. Populates CTE with the random numbers and a separate column holding the first digit of each number

    First Digit
  3. Counts the instances of each digit and returns the results in a table including a simple histogram column for numbers 1-9 (excluding any 0 digit values sometimes returned by my simplistic random number algorithm)

USE tempdb;
GO

DECLARE @RandomNumbers TABLE
(
    RandomNumber INT
);

-- Use Itzik Ben Gan's technique to quickly generate 65536 records
WITH 
  n5(x) AS (SELECT 1 UNION SELECT 0),
  n4(x) AS (SELECT 1 FROM n5 CROSS JOIN n5 AS x),
  n3(x) AS (SELECT 1 FROM n4 CROSS JOIN n4 AS x),
  n2(x) AS (SELECT 1 FROM n3 CROSS JOIN n3 AS x),
  n1(x) AS (SELECT 1 FROM n2 CROSS JOIN n2 AS x)

-- Create 65536 random numbers
INSERT INTO @RandomNumbers
SELECT
    ABS(CHECKSUM(NEWID())) % 100000 AS RandomNumber
FROM n1;

-- CTE containing each random number and its first digit
WITH BenfordTest (FirstDigit, RandomNumber) AS
(
    SELECT
         SUBSTRING(CAST(RandomNumber AS VARCHAR(MAX)), 1,1) AS FirstDigit
        ,RandomNumber
    FROM @RandomNumbers
)

-- Count how many instances of each number there is from 1-9
SELECT
     FirstDigit
    ,COUNT(*) AS InstanceCount
    ,REPLICATE('|', 100. * (CAST(COUNT(*) AS NUMERIC(5,0)) / b2.Total)) AS PctDistribution
FROM BenfordTest b1,
    (SELECT CAST(COUNT(*) AS Numeric(5,0)) Total FROM BenfordTest) b2
WHERE FirstDigit > 0 -- exclude any zero digit records
GROUP BY FirstDigit, b2.Total
ORDER BY FirstDigit ASC;

And here are the results. Because these are random numbers you can see that the PctDistribution column, and the Excel graph I created is pretty much uniformly distributed between about 10.8% and 11.5% for all leading digits.

SQLResultsRandom  GraphRandom

 

Made Up Numbers (AdventureWorksDW2008)

Now we all know that AdventureWorks data is not real, but is there any “realness” to it at all? Probably not. We’ll test against the SalesAmount column in the FactInternetSales table.

BTW, analysis like this is a great excuse to use the TABLESAMPLE clause in order to avoid querying the entire table.

USE AdventureWorksDW2008;
GO

WITH BenfordTest (FirstDigit) AS
(
    SELECT
         SUBSTRING(CAST(SalesAmount AS VARCHAR(MAX)), 1,1) AS FirstDigit
    FROM FactInternetSales
    TABLESAMPLE (20 PERCENT)
)

SELECT
     FirstDigit
    ,COUNT(*) AS InstanceCount
    ,REPLICATE('|', 100. * (CAST(COUNT(*) AS NUMERIC(5,0)) / b2.Total)) AS PctDistribution
FROM BenfordTest b1,
    (SELECT CAST(COUNT(*) AS Numeric(5,0)) Total FROM BenfordTest) b2
GROUP BY FirstDigit, b2.Total
ORDER BY FirstDigit ASC;

OK, I guess that proves just how real AdventureWorks data really is. This provides some pretty good evidence that AW numbers were not generated randomly and were almost certainly not based on real sales figures. On the other hand maybe the regional cycling gear reps are fudging the numbers a bit….
 
 SQLResultsAW GraphAW

Real Numbers

Here are results of a query I ran on some real data I have available to me. Trust me, it is real data but, naturally, I can’t share it. The distribution looks about right, too. Kinda cool, eh?

  SQLResultsRealData GraphRealData

You can try the sample code out yourself on some data that you have access to.

Here’s the code stub:

WITH BenfordTest (FirstDigit) AS
(
    SELECT
         SUBSTRING(CAST(<NumberFieldName> AS VARCHAR(MAX)), 1,1) AS FirstDigit
    FROM <SourceTableName>
    TABLESAMPLE (20 PERCENT)
)

SELECT
     FirstDigit
    ,COUNT(*) AS InstanceCount
    ,REPLICATE('|', 100. * (CAST(COUNT(*) AS NUMERIC(5,0)) / b2.Total)) AS PctDistribution
FROM BenfordTest b1,
    (SELECT CAST(COUNT(*) AS Numeric(5,0)) Total FROM BenfordTest) b2
GROUP BY FirstDigit, b2.Total
ORDER BY FirstDigit ASC

The complete code from this post can be downloaded here.

Wednesday, October 21, 2009

Conditionally Hiding Axes for Trellis Displays

Over the last year MVP Tim Kent has put out a series of really useful posts showing how various data visualizations can be created using SSRS.

The latest post on Trellis displays got me thinking on how I could tweak a few of the settings in Tim’s very useful sample report just a bit more.

In order to show more sample data, I changed the top axis of Tim’s sample report to show sales Bike subcategories because as we all know AdventureWorks sells waaaay more bikes than anything else. Below is a shot of the original report after that change.

TimKentTrellis

I made a few more tweaks and changes and came up with the report below

Trellis

The main ink-saving tip is to conditionally hide / show labels on the X and Y axes based on the items at the top left and bottom left of the trellis. In this case it is Road Bikes and Northeast. All that is needed here is a small amount of extra MDX to ORDER and RANK members in both the Region and Subcategory sets to provide the right meta data required to perform the conditional hide / show. Here is the MDX for the report showing the ordering and ranking of the appropriate sets.

WITH
  SET [SalesOrderedSubcategories] AS
    Order
    (
      [Product].[Product Categories].[Category].[Bikes].Children
     ,[Measures].[Sales Amount]
     ,BDESC
    )
  SET [SalesOrderedRegions] AS
    Order
    (
      [Sales Territory].[Sales Territory].[Region].MEMBERS
     ,[Measures].[Sales Amount]
     ,BDESC
    )
  MEMBER [Measures].[SubcategoryRank] AS
    Rank
    (
      [Product].[Product Categories].CurrentMember
     ,[SalesOrderedSubcategories]
    )
  MEMBER [Measures].[RegionRank] AS
    Rank
    (
      [Sales Territory].[Sales Territory].CurrentMember
     ,[SalesOrderedRegions]
    )
SELECT
  {
    [Measures].[Sales Amount]
   ,[Measures].[SubcategoryRank]
   ,[Measures].[RegionRank]
  } ON COLUMNS
,(
    [SalesOrderedSubcategories]
   ,[SalesOrderedRegions]
   ,[Date].[Calendar Quarter of Year].[Calendar Quarter of Year].MEMBERS
  ) ON ROWS
FROM [Adventure Works];
Set the SORT property of each group to its respective GroupNameRank calculated member, this way we can be sure that in our example the top ranked Subcategory (Road Bikes) will be the left-most item and the lowest ranked Region (Southwest) will be the bottom-most item in the trellis.

Sorting 

The real trick here is to use an expression to conditionally hide / show the axis labels so that we only see the X-axis labels at the bottom of the trellis and Y-axis labels on the left side of the trellis.

AxisLabels

Y-axis uses an expression that only shows the axis for the MIN ranked member for Subcategory

=IIF(
    Fields!SubcategoryRank.Value = MIN(Fields!SubcategoryRank.Value, "Trellis")
    , false
    , true
)

and X-axis uses the MAX ranked member for Region

=IIF(
    Fields!RegionRank.Value = MAX(Fields!RegionRank.Value, "Trellis")
    , false
    , true
)

It also helps to check the Hide first and last labels along this axis for the Y-axis as the zero value tends the throw off the alignment with the other charts where the X-axis is hidden.

HideLablels

The sample .rdl file can be downloaded here.

Friday, October 16, 2009

Windows Problem Steps Recorder

Been meaning to write about this one for some time. This year’s TechEd USA keynote was centered around Windows Server 2008 R2. The speakers demoed plenty of good features but the one that stood out (and easily got the most spontaneous applause) was the Problem Steps Recorder. It does exactly as its name suggests: it records problem steps.

The PSR is a really simple app that is baked into both Windows Server 2008 R2 and Windows 7. It’s actually not that easy to find unless you know what you’re looking for – the Start menu doesn’t even list the app by its name.

StartMenu 

The UI couldn’t be simpler as seen below.

image

The user opens the app, presses Start Record, performs the steps that reproduce a problem they’re experiencing (including their own comments if needed), then presses Stop Record. PSR then asks where they want to save the results. The output produced is a zip archive containing a single MHT file. The user then emails the zip archive to the helpdesk or whoever is trying to help them.

The generated MHT file is a navigable, screenshot-by-screenshot, annotated document of each step the user performed while recording. Below is an example step explanation with screenshot.

image

Here is a text summary of each step without screenshots that is found at the bottom of each MHT file.

image

OK, so why does PSR have to be just a helpdesk tool? Like many others in the audience I thought of this as a potential quick & dirty documentation tool. Admittedly out of the box the text produced describes every step as a “Problem” but once you look past that this could be a great little time saver in a number of situations.

Here’s an example output file that walks through creating an SSRS project and adding a new report in BIDS.

Data Dude Error TSD03006 – Explicit Database Reference

Problem

You’ve just created a new Data Dude project and imported your DB schema, or you’ve just synchronized schemas with an existing project having added several new views / UDFs / SPROCs etc. When you try to build your project you find that there are tons of TSD03006 errors that are stopping you. Why?

TSD03006: View: [dbo].[vFactResellerSales] contains an unresolved reference to an object. Either the object does not exist or the reference is ambiguous because it could refer to any of the following objects: [dbo].[DimProduct].[s]::[ProductKey], [dbo].[FactResellerSales].[ProductKey] or [dbo].[FactResellerSales].[s]::[ProductKey]

TSD03006

Solution

Ensure any explicit database name references do not exist in your code. If you need to explicitly reference a database do it by using variables.

Removing the explicit DB references from the code should make the TDS03006 errors disappear. Admittedly you should be cleaning up any explicit DB references within your code, but when whipping up a new script in the early hours of the morning this may be something that you’d miss. And suddenly getting a whole heap of build-blocking errors at 3am can be incredibly annoying. 

Sometimes explicit DB references can creep into code without you catching it. For example when creating views from large tables I often start by scripting out a SELECT statement within SSMS. The code that is generated by SSMS includes an explicit reference to the database.

SELECT [ProductKey]
       ,[OrderDateKey]
       ,[DueDateKey]
       ,[ShipDateKey]
       ,[ResellerKey]
       -- Shortened for brevity

       ,[CustomerPONumber]
FROM   [AdventureWorksDW2008].[dbo].[FactResellerSales]

It’s the explicit [AdventureWorksDW2008] reference that causes the TSD03006 errors. If you add to the SSMS generated code and join other tables but keep even one explicit DB reference you will continue to receive TSD03006 errors for each field in the view definition.

Data Dude is indeed bringing a valid problem to our attention but I think there should be a more elegant way to communicate the situation. One view containing 37 fields with 1 explicit DB reference returns 37 errors. In the end the fix is easy, but figuring out the fix takes more time than it should based on the content and volume of the error messages.

BTW make sure that you’re using Data Dude GDR R2 version 9.1.40413.00. I found an MS support document that detailed a similar issue pertaining to using Server and Database aliases in referenced projects that is fixed in this release. This issue is similar but different in that it’s not a direct problem with aliases or referenced projects, just careless coding on my part.

Thursday, October 15, 2009

Cloud-based Tabular Data Sources

I realize there are many out there who are sick of the term “the cloud”. Larry Ellison's rant on this topic is great.

Nonetheless I got my Azure invitation yesterday and for no other reason other than it’s geeky, tried to access it from PPS. As I’d hoped, it was simple (as was connecting using SSMS). I set up a sample DB in my allotted condensed water vapor storage area and created a tabular data source using the appropriate connection string. Easy!

ConnectionString

…and here’s the data in it

DataSourcePreview

Hopefully cloud-based SSAS is not far away.

Windows 7 and PerformancePoint M&A Setup Gotcha

For those who have, or are about to, upgrade to Windows 7 and reinstall a local instance of PPS for the purposes of demos / experimentation / learning etc. here are a couple of quick tips on getting things up and running.

  1. Before installing the M&A Server be sure to read this post and ensure all your pre-reqs are in place.
  2. Install the latest hotfix (I understand that PPS SP3 coming out in a couple of days)

UPDATE: SP3 is now available so skip step 2 above and install SP3 instead

x86: http://www.microsoft.com/downloads/details.aspx?FamilyID=90c596a5-aca4-4ded-9072-facf834bc0c6&displaylang=en

x64: http://www.microsoft.com/downloads/details.aspx?FamilyID=3ad75ae5-d2cd-4953-87cf-5f74d79804c6&displaylang=en

And now the Win7 twist. Once you have installed, configured the M&A server and fired up Dashboard Designer (DD) you receive the following message when trying to create a data source:

The requested item cannot be found. Verify that it exists and that you have access permissions.

OK, so this is an application pool account problem? Nope. The problem is you’re not an administrator on this Monitoring Server yet. So you go into the administrative section in DD and add your account. When you to the options section and try to administer the server you get this error:

You do not have Administrator privileges on the Monitoring Server ‘http://localhost:40000/WebService/PMService.axmx’. Contact your Monitoring Server Administrator.

And herein lies the problem. You’re not a monitoring server administrator yet, but how can you make yourself one if you can’t get into the admin screen?

The solution:

You need explicitly run Dashboard Designer as an administrator (“but I AM an administrator!”). By default you’re not running this application as an admin. This is related to the UAC settings in Win7. Sure you can alter (turn off) the UAC settings but you may not want to, or be allowed to, in some cases.

How do you run DD as an admin? The Start menu item that is created for DD is only a link to the ClickOnce launch URL so you won’t find the appropriate “Run as administrator” option on the context menu if you SHIFT + Right-click on it. In order to run DD as an administrator find the DD executable (PSCBuilder.exe) in the file system. On a default install it will be located in %Program Files\Microsoft Office PerformancePoint Server\3.0\Monitoring\PPSMonitoring_1\DesignerInstall\3.0

Right-click the executable and “Run as administrator” from there.

RunAsAdmin

In this administrator instance of Dashboard Designer go into the Server Options section and add yourself as an administrator.

You should be good to go from there.