INTRODUCTION TO MDX
Stick around for RAFFLE and the AFTER EVENT! All our volunteers and organisers do not get paid for organizing this event – If you see them, please: Give them a hug Shake their hand Say thank you Spread the word Get involved yourself Don’t forget to thank the sponsors for their support Thank the speakers for donating their time, energy and expenses
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_