Many-to-Many Dimension bug

Jon Axon mailed me recently with an interesting bug he’d come across concerning many-to-many dimensions, where it looks like the AS engine is trying to be a bit too clever for its own good as far as query optimisation goes. It’s reproducible on AS2005 SP2 and Katmai RC0, and I logged it on Connect here:

Here’s an example on Adventure Works that Jon gave me. The following query:

[Measures].[Customer Count] on 0
FROM [Adventure Works]

Shows the total number of customers as being 18484. Looking at the Sales Reason dimension (which has a many-to-many relationship with the measure group Customer Count is from), if you run a relational query on the underlying data source you can see that not every order was associated with a sales reason – this is the key point here. Now if we run the query:

[Measures].[Customer Count] on 0
FROM [Adventure Works]
WHERE [Sales Reason].[Sales Reason].[All Sales Reasons]

We can see that it returns the same result as the first query, 18484, as you would expect. But what if we want to find the number of customers who specified a sales reason? You would think that the following query would do that:

[Measures].[Customer Count] on 0
FROM [Adventure Works]
WHERE [Sales Reason].[Sales Reason].[All Sales Reasons].Children

But it doesn’t, it returns 18,484 again. However if you run this query which should be equivalent to the previous query:

[Measures].[Customer Count] on 0
FROM [Adventure Works]
WHERE {[Sales Reason].[Sales Reason].&[1],
       [Sales Reason].[Sales Reason].&[2],
       [Sales Reason].[Sales Reason].&[3],
       [Sales Reason].[Sales Reason].&[4],
       [Sales Reason].[Sales Reason].&[5],
       [Sales Reason].[Sales Reason].&[6],
       [Sales Reason].[Sales Reason].&[7],
       [Sales Reason].[Sales Reason].&[8],
       [Sales Reason].[Sales Reason].&[9],
       [Sales Reason].[Sales Reason].&[10]}

It returns the value we’re looking for, 17022. Not good! What I suspect is happening here is that when the query optimiser sees the expression [Sales Reason].[Sales Reason].[All Sales Reasons].Children in the Where clause, it assumes that it’s equivalent to [Sales Reason].[Sales Reason].[All Sales Reasons] which it is in most cases, just not here. Interestingly if you look in Profiler and run the queries on a cold cache, you see exactly the same activity when [Sales Reason].[Sales Reason].[All Sales Reasons].Children is in the Where clause as when [Sales Reason].[Sales Reason].[All Sales Reasons] is there; but when you explicitly list all of the individual sales reasons, as in the last query, because Sales Reason has to resolve itself through the Internet Sales Order Details dimension which is ROLAP, you see SQL queries being fired off against the relational database.

Microsoft buys DATAllegro

Woweee, great news: Microsoft is buying the DW appliance vendor DATAllegro! This is big, big news for Microsoft BI and I am super-excited. Curt Monash has a few posts that explain why this is so big on his blog:
See also:
I’ve long wanted to be able to stick Analysis Services in ROLAP/HOLAP mode on top of one of these MPP babies, and maybe now I’ll get the chance. Potentially in the long term we might get MPP MOLAP too, which would be even better…

XLCubed (and a rant about Microsoft’s client tool strategy)

The other week I stopped by in Maidenhead to see the guys at XLCubed, and to take a look at their latest stuff. XLCubed have been around a long time and their Excel addin AS client has always been one of the best out there, but with the improved Analysis Services support in Excel 2007 (especially with the introduction of ‘convert to formulas’) and the Proclarity acquisition has put a squeeze on the client tools sector. A lot of the third party client tools out there, XLCubed included, are better in a lot of ways than the equivalent Microsoft offerings but it’s often hard to explain to someone who isn’t very experienced with Analysis Services what the advantages are and why they represent a good reason to buy a non-Microsoft product. So, in order to survive, you need a clear, unique selling point and XLCubed now have one in the form of Microcharts after they bought Bonavista Systems last year (I blogged about the Microcharts product in its original form here). Microcharts gives you the ability to create sparklines, bullet graphs and other in-cell charts, which is not only impressive when used in conjunction with regular Excel and Reporting Services (with or without AS as a data source) but enters the realm of extreme coolness when you see how it’s been integrated with XLCubed.

Here’s just one example of the kind of dashboard you can build with XLCubed:


You can see a whole page of sample dashboards here:

Nice, eh? I should also mention they have an excellent data visualisation blog that’s well worth a read:

While on the subject of client tools, can I veer off on a tangent here and criticise Microsoft’s strategy in this area? In my opinion (and just about everyone I’ve met agrees with me, not least disgruntled ex-Proclarity employees) what they’ve done has actually harmed the core Microsoft BI market over the last two years. Before the Proclarity acquisition it wasn’t an ideal situation, for sure, since telling customers that they had to buy their client tools from a third party looked bad. But what Microsoft have done is bought the leading third-party client tool and effectively chucked it in the bin, saying people should use Excel and PerformancePoint instead. Excel 2007 is a good client tool but a) a lot of companies are still on Excel 2003 and before, and are not going to upgrade just for the sake of a BI project, b) it has nowhere near the kind of advanced functionality that the Proclarity desktop tool had and never will, and c) it still has a few glaring problems (see here for example); PerformancePoint too is encouraging but very much a version 1.0. Microsoft’s long release cycles for both mean that we have to wait way too long for any upgrade in functionality, and in the meantime we’re left with a vacuum: the third party client tool market has been weakened because now all customers will want to use Microsoft client tools as a first choice, but these client tools are not yet up to scratch. Why on earth didn’t they carry on developing the Proclarity product line for a few more years until a smoother transition could be made? Why the prejudice against standalone client tools? Once again I’m left with the feeling that senior people in Redmond have little idea what’s going on in the real world and more importantly are insulated from the impact that their decisions have on the bottom line. On the positive side, though, Microsoft’s actions have given companies like XLCubed the breathing space they needed to innovate and survive.

Show Hidden Objects in the Calculations tab

Here’s a new button I’ve just noticed in the toolbar on the Calculations tab in BIDS 2008: Show Hidden Objects. Quite often when you’re writing MDX you want to reference hierarchies that are hidden to the end user, and in BIDS 2005 you had to unhide them to be able to see them (and so find out their unique name) in the metadata pane, which was a pain; now in BIDS 2008 you just need to click the new ‘Show Hidden Objects’ button to be able to see them. For some bizarre reason it doesn’t seem to allow me to see hidden sets or calculated members though – why?


Kalido Universal Information Director now generates Analysis Services cubes

Here’s the press release from Kalido:

I don’t have any direct experience with Kalido’s products (although I’ve heard good things) but I’d be interested to see the cubes it generates. I wonder to what extent it’s possible to optimise automatically generated cubes?

SQLBits III – Registration Now Open!

Registration for SQLBits III, to be held at Hatfield in the UK on September 13th, is now open! SQLBits is the UK’s finest SQL Server technical conference, and it’s 100% free to attend too. Take a look at:
…to see what we’ve got lined up. We’ve had an amazing 63 session submissions this time (the BI track is the strongest yet, in my opinion) so we’re asking everyone who registers to vote on the sessions they’d like to see. We’re also running a competition to design a logo for the day too, and you can vote on the logos here:
There are also SQLBits groups on Facebook and LinkedIn if you’d like to keep in touch with other people who are going or share photos etc. And as I’ve said before, we’d still like to talk to any companies who are interested in sponsoring the event.

Incidentally, Hatfield is just north of London and right next to Luton airport, so it’s very easy to get to if you’re coming from Europe. Why not pop over on Easyjet, and let your significant other go shopping in London for the day while you enjoy the conference?

One other thing to mention is that we’re having a training day at the same venue the day before, September 12th. There are a number of reasonably-priced one-day seminars on SQL Server related subjects to choose from:
…including, as you can see, an introduction to SQL Server BI called ‘Making the most of data through business intelligence’ run by me and Allan Mitchell (SSIS MVP and one of the guys behind If you know a DBA, business analyst or manager who wants to learn more about BI then it’s the ideal way to get them out of the office for the day – just tell them it’s a trip to see Mitchell and Webb perform live.

Last night’s BI evening event

I just wanted to say a quick thank you to everyone who attended last night’s BI evening event at TVP, especially to Jes Kirkup of TAH (TAH also very kindly provided the beer and pizza during the break, which I’m very grateful for) and Jeremy Kashel of Adatis. I’ve asked them both to post their slides up on the web so once they’ve done that I’ll post the links here.

I promise that it won’t be quite so long before we have another event at TVP – I’ll try to do a better job of alternating between central London and TVP because I know we get a completely different group of people at each venue.

UPDATE: You can get hold of Jeremy Kashel’s slides on "PEL vs MDX" here –

UPDATE #2: You can get hold of Jes Kirkup’s slides, along with a detailed write up of what he presented, on his new blog:!55BF48702D38E629!167.entry!55BF48702D38E629!169.entry

%d bloggers like this: