Archive for the ‘Off-topic’ Category
I’m an MVP!!!
MDX Limericks
Here are the rules:
- Each entry must be an MDX query executable against any cube/perspective in the Adventure Works database, and must take the form of a limerick (see http://en.wikipedia.org/wiki/Limerick_(poetry for details)
- The query must return at least one cell which contains a value other than null
- Entries should be posted as comments to this blog entry
- Extra points will be awarded for wit and creativity
It’s actually pretty difficult. Here’s my first attempt:
WITH MEMBER [Date].[Day Name].[TODAY]
AS 1 + [Date].[Day Name].[THURSDAY]
SELECT [Average Rate]
ON 0, [Date].[Date]
ON 1 FROM [Direct Sales] WHERE([MAY])
As an aside, this brings up the vexed question of how you should pronounce MDX. In my limerick I’m not pronouncing the punctuation so it reads:
WITH MEMBER DATE DAY NAME TODAY,
AS ONE PLUS DATE DAY NAME THURSDAY,
SELECT AVERAGE RATE,
ON ZERO, DATE DATE,
ON ONE FROM DIRECT SALES WHERE MAY.
However I’m prepared to be flexible on this point.
So come on all of you (and especially you Jon, as I know you can never resist something like this) and get composing!
UPDATE: I’ve decided two rule changes, to make things easier. First I’ll allow queries from Foodmart 2000 for those of you on AS2K; second I’ll allow statements other than SELECT statements (eg CREATE SET, UPDATE CUBE etc) so long as they execute without errors.
Blog Birthday
Do you know anyone Scottish?
- Open SQL Server Management Studio
- Connect to the AdventureWorks cube
- Run the following query:
select [Measures].[Internet Sales Amount]
on 0,
[Geography].[Geography].[State-Province].[England].children
on 1
from [Adventure Works] - Scroll down the result set and point out that according to AdventureWorks, Scotland is a city in England.
A new form of MDX
Who reads my blog?
OLAP Jokes
Q: What does a calculated member have in common with a eunuch?
A: They both can’t have children
Q: Why couldn’t the hierarchy become a tightrope-walker?
A: It was unbalanced
Q: Why did [Year-Quarter-Month] beat Measures at an arm wrestle?
A: Because it was a strong hierarchy
Q: What does tired cube do?
A: Has a KPI
Q: Why did the dimension go to prison?
A: Because it was degenerate
A cube walks into a bar, pops himself on a bar stool and says "Whisky please".
"Double?" says the barman
"No thanks replies the cube "Just a measure"
A girl goes speed dating and after a run of duff prospects a dimension sits down opposite her and they engage in sprightly conversation. After the event is over, her friend asks "Did you get that dimension’s number? You two really seemed to hit it off"
"No" replies the girl "He was really deep at times – had a lot of levels – but you know parent-child dimensions, just too much of a mummy’s boy"
Q: Was the cube straight or gay?
A; Neither, it was BI.
Have you heard that the [Date Shipped] dimension is playing Hamlet at the National Theatre? It’s a role-playing dimension!
Q: What kind of a dimension is [Dictionary]?
A: A reference dimension
Q: What do pre-menstrual BI developers suffer from?
A: PTS
Q: How did the police catch the serial-killer query?
A: They used a Profiler
Did you know that Disney want to turn the Adventure Works cube into a multi-million dollar blockbuster movie? They’ve already optioned the MDX Script.
Q: What on earth was the cube trying to do when it set fire to its wallet?
A: It must have been trying to warm its cache.
Q: What’s the angriest MDX function?
A: Crossjoin
Q: What’s a dentist’s favourite MDX function?
A: Extract
Q: Why did the dimension take all day to take off its suit and put on a pair of jeans?
A: It was a slowly-changing dimension
Q: Why did the dimension keep itself to itself?
A: It was a private dimension.
Q: Why wasn’t the Level allowed in the fascist cube?
A: It was disabled
Q: What’s the porn director’s favourite MDX function?
A: BottomCount
Q: Why did the YTD calculation always finish last?
A: It always lagged too far back.
Q: Why were the other hierarchies frightened of Year-Week-Quarter?
A: It was unnatural
Q: Did you hear about the badger whose home wasn’t allowed in the subcube?
A: It was an arbitrary shaped set.
Q: Why was the MDX expression never able to get a date?
A: It was rank.
Q: What MDX function makes Previous Year Growth and Market Share blush?
A: StripCalculatedMembers
Q: How did the BI developer send his backed-up database to a colleague on the other side of London?
A: In a .cab file
Q: What do cellsets use to cut down trees?
A: Axes
Q: What did the cube leave on the floor when it fell over in the toilet?
A: A minidump
Q: What function would you use to retrieve [Product].[All].[Dried Fruit].[Raisins]?
A: CurrentMember
Q: Why did the cube have nothing to do after the meeting?
A: It had no actions
Q: Whilst walking through the MDX Script mountain range, why did the assignment not mind reports of a FREEZE on the peaks?
A: He was in a lower pass
UPDATE: if you think you can do better then leave your jokes in a comment. We tried to think of a prize for the best one but baulked at the idea of giving away something worth having and paying for the postage.
Improving performance of VPC
Great tip from Roman Rehak here, if like me you’re running Yukon on Virtual PC. NTFS compression certainly hasn’t harmed my performance and it’s saved me 4Gb of disk space!
Jon Axon’s blog
OK, this is nothing whatsoever to do with BI, but my colleague Jon Axon has started his own blog here. If you’re interested in concurrent programming then check it out – and make sure you hit the site several times to make him feel like someone is actually reading his blog! It will make him feel so much better…
