2
.. i18n: A look at few examples to write MDX Queries
3
.. i18n: -------------------------------------------
6
A look at few examples to write MDX Queries
7
-------------------------------------------
9
.. i18n: Writing a simple MDX on a SALES Schema::
12
.. i18n: {[partner_country].[all]} on rows,
13
.. i18n: {[measures].[Items Sold]} on columns
14
.. i18n: from sale_order_line
17
Writing a simple MDX on a SALES Schema::
20
{[partner_country].[all]} on rows,
21
{[measures].[Items Sold]} on columns
24
.. i18n: Gives results as,
29
.. i18n: ===================== ============
31
.. i18n: ===================== ============
32
.. i18n: All partner_country [43.0]
33
.. i18n: ===================== ============
36
===================== ============
38
===================== ============
39
All partner_country [43.0]
40
===================== ============
42
.. i18n: Expanding the partner country to its children, we change the MDX as.::
45
.. i18n: {[partner_country].[all],[partner_country].children} on rows,
46
.. i18n: {[measures].[Items Sold]} on columns
47
.. i18n: from sale_order_line
50
Expanding the partner country to its children, we change the MDX as.::
53
{[partner_country].[all],[partner_country].children} on rows,
54
{[measures].[Items Sold]} on columns
57
.. i18n: Gives result as,
62
.. i18n: ===================== ============
64
.. i18n: ===================== ============
65
.. i18n: All partner_country [43.0]
66
.. i18n: Belgium [30.0]
69
.. i18n: ===================== ============
72
===================== ============
74
===================== ============
75
All partner_country [43.0]
79
===================== ============
81
.. i18n: One more example bit complex with slicer::
84
.. i18n: {[date_order].children,[date_order].[2008].children,[date_order].[2008].[Q2].children},
85
.. i18n: {[measures].[Items Sold]}
86
.. i18n: from sale_order_line
87
.. i18n: where ([date_order].[2008])
90
One more example bit complex with slicer::
93
{[date_order].children,[date_order].[2008].children,[date_order].[2008].[Q2].children},
94
{[measures].[Items Sold]}
96
where ([date_order].[2008])
98
.. i18n: Gives results as:
103
.. i18n: ===================== ============
104
.. i18n: / Items Sold
105
.. i18n: ===================== ============
106
.. i18n: 2008.0 [43.0]
108
.. i18n: ===================== ============
111
===================== ============
113
===================== ============
116
===================== ============