INTRODUCTION TO MDX
Stick around for SWAG! (Prize drawing at 5.00 p.m) All our volunteers and organisers do not get paid for running SPS SQLSaturday Cambridge and do it because they believe in the power of community (or are just plain nuts). Please show your gratitude for making this possible by: Giving them a hug Shaking their hand Saying thank you Coming back next year Consider getting your company to pay for a precon next year Speading the word Getting involved yourself But most of all, by enjoying the day! Don’t forget to thank the sponsors for their support Thank the speakers for donating their time, energy and expenses
SQLCloud — XBox One!!! (make sure you know how to play the Jet Set Willy vendor competition!) SQLCloud—Dark Side Of The Moon, The Wall and Wish You Were Here Microsoft — MCP Voucher Data Idols — Supercar Driving Experience Profisee — Signed MDS Book and £50 Amazon Voucher SQLSentry — Plan Explorer PRO License Pyramid Analytics—Coffee Machine Effektor — Lego Big Ben Rencore — SPCAF Professional License (valued at $2099!) Axioworks — Amazon Fire TV and £75 Amazon Voucher DELL — Beats by Dr Dre Headphones Redgate — DLM Workshop Pluralsight — Annual Plus subscriptions All Your Base Conference — 3 x Conference Tickets VisualSP—Annual training subscription Loads of books and much much more!!!
WHAT SQL CUBE BASICS MDX HOW SELECT, FROM, WHERE, SUBSELECT SETS, MEMBERS FUNCTIONS - Q&A
Jens Vestergaard Maersk Line IT – MSBI – Engineering /
$ GROUP PROFIT 2014 – One Pink Floyd song comes to mind… CONTAINERS REFRIGURATED (REEFERS) LAND BASED EMPL. AT SEA 600 VESSELS (20 TRIPPLE-E’S) (11 EVEN BIGGER ONES TO COME) 90+ COUNTRIES 1 BI/MDM DEPARTMENT
WHAT!
SELECT, FROM, WHERE TWO DIMENSIONAL FORMAT
SELECT, FROM, WHERE MULTI DIMENSIONAL FORMAT
Ordered collection of (at least) one member from one or more dimensions Simple Tuple [Date].[Fiscal].[Fiscal Year].&[2005] If a tuple is composed of members from more than one dimension, the members represented by the tuple must be enclosed in parentheses ([Date].[Fiscal].[Fiscal Year].&[2005], [Geography].[City].&[Baltimore]&[MD]) A tuple can encompass members in multiple dimensions, as well as multiple members from the same dimension.
In MDX syntax, tuples are enclosed in braces to construct a set. A set is an ordered collection of zero, one or more tuples. {([Date].[Fiscal].[Fiscal Year].&[2005], [Geography].[City].&[Baltimore]&[MD]) , ([Date].[Fiscal].[Fiscal Year].&[2006], [Geography].[City].&[Cincinnati]&[OH])} A set can contain more than one occurrence of the same tuple. {[Date].[Fiscal].[Fiscal Year].&[2005], [Date].[Fiscal].[Fiscal Year].&[2005]} Certain MDX functions accept tuples as parameters, and will raise an error if a single tuple set is passed. ([Date].[Fiscal].[Fiscal Year].&[2005]) ≠ { [Date].[Fiscal].[Fiscal Year].&[2005] }
HOW?
CurrentMember DefaultMember Anscestor Cousin Lag / Lead NextMember / PrevMember
SUM / MIN / MAX / AVG / COUNT / DistinctCount CoalesceEmpty IIF
Ancestors Ascendants Descendants SELF, BEFORE, AFTER, BEFORE_AND_AFTER, SELF_AND_AFTER, SELF_AND_BEFORE, SELF_BEFORE_AFTER, LEAVES Generate Except Head / Tail LastPeriods MTD / QTD / YTD Siblings UNION
Empty Axis Minus (-) SET ~ NOT IN NonEmpty or NON EMPTY Moving Averages Date Calculations IsLeaf IsAncestor
Testing Permissions Testing in Excel Profiler
Q&AQ&A
MDX Function Reference: Stairways to MDX*: MSDN: MSSQLTips: learning-sql-server-mdx/ learning-sql-server-mdx/ Literature: Fast Track to MDX: second/dp/B006V0BNPE/ref=sr_1_2?ie=UTF8&qid= &sr=8- 2&keywords=mdx+fast+trackhttp:// second/dp/B006V0BNPE/ref=sr_1_2?ie=UTF8&qid= &sr=8- 2&keywords=mdx+fast+track MDX Solutions: ebook/dp/B001KU83FI/ref=sr_1_3?ie=UTF8&qid= &sr=8- 3&keywords=mdx+analysis+serviceshttp:// ebook/dp/B001KU83FI/ref=sr_1_3?ie=UTF8&qid= &sr=8- 3&keywords=mdx+analysis+services Practical MDX Queries: ebook/dp/B003QP3XGY/ref=pd_sim_351_4?ie=UTF8&refRID=1CNW10TRVP068BDEWJFJ&dpSrc=si ms&dpST=_AC_UL320_SR246%2C320_http:// ebook/dp/B003QP3XGY/ref=pd_sim_351_4?ie=UTF8&refRID=1CNW10TRVP068BDEWJFJ&dpSrc=si ms&dpST=_AC_UL320_SR246%2C320_