160 likes | 281 Vues
Dive into the intricacies of multidimensional data analysis with this guide on querying cubes. This resource covers the essential syntax for constructing complex queries that aggregate sales data across various product categories, including Bikes, Accessories, and Clothing. Learn how to utilize measures effectively to combine reseller and internet sales amounts while filtering by geography and time. Whether you’re a novice or an experienced analyst, these strategies will enhance your reporting capabilities and data insights.
E N D
(3) -4 -3 -2 -1 0 1 2 3 4
y 4 3 2 (3, 2) 1 x -2 -4 -3 -2 -1 1 2 3 4 -3 -4
y 4 3 (3, 2, 4) 2 Trippy. 1 4 3 x -2 -3 -2 -4 z -4 -3 -2 -1 1 2 3 4 -3 -4
(x, y, z, ?) Freakin’ Sweet! (a1, a2, a3, a4) What the …?!
(a1, a2, a3, a4) (a1, a2, a3, a4, a5) (a1, a2, a3, a4, a5, a6) (a1, a2, a3, a4, a5, a6, a7) (a1, a2, a3, a4, a5, a6, a7, a8) (a1, a2, … an)
Cube Measure Group Σ Measure Member Attribute-Hierarchy
[Product].[Category] • All Products • Accessories • Bikes • Clothing • Components
([Product].[Category].[Bikes]) [Product].[Category] Bikes Clothing Accessories All Products Components
CY 2004 ( [Product].[Category].[Bikes], [Date].[Calendar Year].[CY 2002]) [Date].[Calendar Year] CY 2003 CY 2002 CY 2001 All Periods [Product].[Category] Accessories Bikes All Products Components Clothing
( [Date].[Calendar Year].[CY 2002], [Date].[Fiscal Year].[All Periods], [Product].[Category].[Bikes], [Product].[Subcategory].[All Products], [Geography].[Country].[All Geographies], [Measures].[Reseller Sales Amount] ) I’m supposed to type all that?
( [Date].[Calendar Year].[CY 2002], [Date].[Fiscal Year].[All Periods], [Product].[Category].[Bikes], [Product].[Subcategory].[All Products], [Geography].[Country].[All Geographies], [Measures].[Reseller Sales Amount] ) ( [Product].[Category].[Bikes], [Date].[Calendar Year].[CY 2002])
SELECT [Date].[Calendar Year].Members on COLUMNS, [Product].[Category].Members on ROWSFROM [My Complex Cube]
SELECT [Date].[Calendar Year].Members on COLUMNS, [Product].[Category].Members on ROWSFROM [My Complex Cube]WHERE ([Geography].[Country].[United States])
WITH MEMBER [Measures].[Total Sales Amount] AS ([Measures].[Reseller Sales Amount]) + ([Measures].[Internet Sales Amount]) SELECT [Date].[Calendar Year].Members on COLUMNS, [Product].[Category].Members on ROWSFROM [My Complex Cube]WHERE ([Measures].[Total Sales Amount])