Thursday, July 16, 2009

MDX ParallelPeriod vs NON_EMPTY_BEHAVIOR

This one is a quick one:
In MS SQL Server Analysis Services the MDX function ParallelPeriod and the NON_EMPTY_BEHAVIOR setting are both important and useful. But together they can be just too much of a good thing and cause confusion. Here's a bit of intelligence I have obtained the hard way and haven't seen documented elsewhere.
Suppose for a simplistic example that this year you sell 1 unit to A Co. and 1 unit to B Co. And last year you sold 1 unit to A Co. and 1 unit to C Co.
Now you may usefully define an MDX variable called SalesLY based on the ParallelPeriod function and your regular Sales variable. All very well, you can now compare Sales (this year) with SalesLY (last year).
Then if you know your Analysis Services well - but not quite well enough - you may observe that SalesLY derives from Sales and set the NON_EMPTY_BEHAVIOR of SalesLY to Sales.
And then what happen?
Sales.[All] and SalesLY.[All] both correctly remain at 2. SSAS will not make any calculation error, but the presentation is not likely to be what you want:
A Co. Sales=1, SalesLY=1
B Co. Sales=1, SalesLY=
All : Sales=2, SalesLY=2
The SalesLY column no longer add up! What happened to last year's sale to C Co.? It's quite simple really: Since (this year's) Sales is empty (non-existent) for C Co. and the behavior of SalesLY is now explicitly linked to that, there is now no way last year's sales to C Co. will show up in a listing of SalesLY, except - fortunately - in the [All] aggregation.
So, beware of concurrent use in SSAS of the ParallelPeriod MDX function and the NON_EMPTY_BEHAVIOR setting!

This was a very technical posting to contrast the previous philosophical postings. It was also a quick way to get started again after spending the first half of July in the Scottish Highlands and, notably, Orkney! - A wonderful place for a vacation when it almost only rains during the nights (luckily!) and you dislike crowded areas and take a real interest in history and pre-history.

Wednesday, July 1, 2009

Ancient Greece and modern DW, BI, and PM. - Is there a connection? (2/2)

The posting one month ago discussed the characteristics of DW, BI, and PM, and it mentioned a possible connection to the three top-level components of Aristotle’s modes of persuasion: Logos, Pathos, and Ethos. Time to follow up with the sequel to that!
Here are the main characteristics of each mode of persuasion, listed in direction of increasing impact:

  • Logos - is logical appeal. Normally used to describe facts and figures that support the speaker's topic. Since data is difficult to manipulate, logos may sway cynical listeners. Having a logos appeal also enhances ethos (below) because information makes the speaker look knowledgeable and prepared to his or her audience. However, data can be confusing and thus confuse the audience. Logos can also be misleading or inaccurate,
  • Pathos - is an appeal to the audience’s emotions. It can be in the form of metaphor, simile, a passionate delivery, or even a simple claim that a matter is unjust. Pathos can be particularly powerful if used well, but most speeches do not rely solely on pathos,
  • Ethos - is an appeal to the authority or honesty of the speaker. He, or she, may be a notable figure in the field in question, have a special relation to it, be demonstrably and impressively knowledgeable, or be able to plead moral and ethical integrity and superiority.
Clearly, establishing an Enterprise DW is a basic appeal to business logic. But just as traditional logos is weak on persuasion, an EDW is by itself weak on execution on the revealed business logic, - the problem typically being that much logic is only implied, and emphasis and prioritization may be lacking between subject areas with different importance and urgency.
Similarly, a BI initiative is about directing attention towards a particular subject area and making the members of an organization collectively feel the importance and urgency of that relative to other issues.
Finally, formalized Performance Management is about determining and defining what is good and bad within an organization and a business, and about projecting these definitions onto actual events through KPI’s, scorecards and dashboards. Clearly, for that to work out presupposes a high degree of universal recognition and accept of those controlling a PM initiative, that is: PM by definition relies on ethos for persuasion.

If we accept the parallel between logos-pathos-ethos and DW-BI-PM, what does that tell us about modern business intelligence. To me the central issue is the question of balance. Ethos may be the strongest mode of persuasion, but too much ethos in a speech just produces pharisaism and self-righteousness. Pathos may also have a very strong impact, but excess pathos is the hallmark of political demagogues and business charlatans. Logos may formally be completely correct and superficially sufficient, but too strong a reliance on logos is self-defeating and may expose an inclination towards self-victimization and hindsight. A good speech should rely on all three modes of persuasion and keep a balance between them!

Today, a balance is also needed between DW, BI and PM - and modern businesses should accept that they need to develop a mixed presence of all three. A preference and a focus on just one approach is likely to be insufficient. An EDW ensures preparedness for unforeseen developments, which will certainly occur. But by itself an EDW may produce only that preparedness and very little action. BI initiatives may represent proactive actions vital to developing the business. But such initiatives need a solid foundation on data, or they may be just self-delusion. PM is essentially a reactive approach, which is necessary to control most businesses, but if applied pervasively and in too much detail, it will turn into a straightjacket that strangles innovation and forward-looking initiatives.
In conclusion then, proper management should seek to promote a balanced presence of both DW, BI and PM in the business – not to favor and choose one approach over the other two!

That’s all for now. July’s mid-month posting is likely to be just as deeply technical as this posting has been purely philosophical. Unless actual events intervene, that is, as they ever so often may do... Stay tuned here at morlin's BI blog!