| Line 1... |
Line 1... |
| 1 |
<Schema name="SalesSchema">
|
1 |
<Schema name="SalesSchema">
|
| 2 |
<Cube name="SalesCube" cache="true" enabled="true">
|
2 |
<Cube name="SalesCube" cache="true" enabled="true">
|
| 3 |
<Table name="salesNew">
|
3 |
<Table name="sales">
|
| 4 |
</Table>
|
4 |
</Table>
|
| 5 |
<Dimension type="TimeDimension" foreignKey="date_id" name="OrderDate">
|
5 |
<Dimension type="TimeDimension" foreignKey="date_id" name="OrderDate">
|
| 6 |
<Hierarchy name="OrderDate" hasAll="true" allMemberName="All" primaryKey="date_id">
|
6 |
<Hierarchy name="OrderDate" hasAll="true" allMemberName="All" primaryKey="date_id">
|
| 7 |
<Table name="datedim">
|
7 |
<Table name="datedim">
|
| 8 |
</Table>
|
8 |
</Table>
|
| Line 62... |
Line 62... |
| 62 |
</Level>
|
62 |
</Level>
|
| 63 |
</Hierarchy>
|
63 |
</Hierarchy>
|
| 64 |
</Dimension>
|
64 |
</Dimension>
|
| 65 |
<Dimension type="StandardDimension" name="Price">
|
65 |
<Dimension type="StandardDimension" name="Price">
|
| 66 |
<Hierarchy name="Price" hasAll="true" allMemberName="All">
|
66 |
<Hierarchy name="Price" hasAll="true" allMemberName="All">
|
| 67 |
<Level name="Price" table="salesNew" column="unit_price" type="String" uniqueMembers="true" levelType="Regular" hideMemberIf="Never">
|
67 |
<Level name="Price" table="sales" column="unit_price" type="String" uniqueMembers="true" levelType="Regular" hideMemberIf="Never">
|
| 68 |
<KeyExpression>
|
68 |
<KeyExpression>
|
| 69 |
<SQL dialect="generic">
|
69 |
<SQL dialect="generic">
|
| 70 |
cast(unit_price/5000 as unsigned) </SQL>
|
70 |
case when unit_price<2000 then 0 when unit_price < 5000 then 2000 when unit_price < 10000 then 5000 when unit_price < 15000 then 10000 when unit_price <20000 then 15000 when unit_price < 50000 then 20000 else 50000 end </SQL>
|
| 71 |
</KeyExpression>
|
71 |
</KeyExpression>
|
| 72 |
<NameExpression>
|
72 |
<NameExpression>
|
| 73 |
<SQL dialect="generic">
|
73 |
<SQL dialect="generic">
|
| 74 |
concat(cast(cast(unit_price/5000 as unsigned)*5000 as char), ' - ', cast(cast(unit_price/5000 + 1 as unsigned)*5000 as char)) </SQL>
|
74 |
case when unit_price<2000 then '0 - 2000' when unit_price < 5000 then '2000 - 5000' when unit_price < 10000 then '5000 - 10000' when unit_price < 15000 then '10000 - 15000' when unit_price <20000 then '15000 - 20000' when unit_price < 50000 then '20000 - 50000' else '> 50000' end </SQL>
|
| 75 |
</NameExpression>
|
75 |
</NameExpression>
|
| 76 |
<OrdinalExpression>
|
76 |
<OrdinalExpression>
|
| 77 |
<SQL dialect="generic">
|
77 |
<SQL dialect="generic">
|
| 78 |
cast(unit_price/5000 as unsigned) </SQL>
|
78 |
case when unit_price<2000 then 0 when unit_price < 5000 then 2000 when unit_price < 10000 then 5000 when unit_price < 15000 then 10000 when unit_price <20000 then 15000 when unit_price < 50000 then 20000 else 50000 end </SQL>
|
| 79 |
</OrdinalExpression>
|
79 |
</OrdinalExpression>
|
| 80 |
</Level>
|
80 |
</Level>
|
| 81 |
</Hierarchy>
|
81 |
</Hierarchy>
|
| 82 |
</Dimension>
|
82 |
</Dimension>
|
| - |
|
83 |
<Dimension type="StandardDimension" foreignKey="payment_method" name="Payment">
|
| - |
|
84 |
<Hierarchy name="Payment" hasAll="true" allMemberName="All" primaryKey="paymentmethodid">
|
| - |
|
85 |
<Table name="paymentmethod" schema="">
|
| - |
|
86 |
</Table>
|
| - |
|
87 |
<Level name="Gateway" column="gateway" nameColumn="gateway" ordinalColumn="gateway" type="String" uniqueMembers="false" levelType="Regular" hideMemberIf="Never">
|
| - |
|
88 |
</Level>
|
| - |
|
89 |
<Level name="Payment Method" column="paymentmethodname" nameColumn="paymentmethodname" ordinalColumn="paymentmethodname" type="String" uniqueMembers="false" levelType="Regular" hideMemberIf="Never">
|
| - |
|
90 |
</Level>
|
| - |
|
91 |
</Hierarchy>
|
| - |
|
92 |
</Dimension>
|
| 83 |
<Measure name="Quantity" column="quantity" datatype="Integer" formatString="##,###" aggregator="sum" visible="true">
|
93 |
<Measure name="Quantity" column="quantity" datatype="Integer" formatString="##,###" aggregator="sum" visible="true">
|
| 84 |
</Measure>
|
94 |
</Measure>
|
| 85 |
<Measure name="Average Selling Price" column="unit_price" datatype="Numeric" formatString="##,###" aggregator="avg" visible="true">
|
95 |
<Measure name="Average Selling Price" column="total_amount" datatype="Numeric" formatString="##,###" aggregator="avg" visible="true">
|
| - |
|
96 |
</Measure>
|
| - |
|
97 |
<Measure name="Total Sales" column="total_amount" datatype="Numeric" formatString="##,##,###" aggregator="sum" visible="true">
|
| - |
|
98 |
</Measure>
|
| - |
|
99 |
<Measure name="Transfer Price" column="transfer_price" datatype="Numeric" formatString="##,##,###" aggregator="sum" visible="true">
|
| 86 |
</Measure>
|
100 |
</Measure>
|
| 87 |
<CalculatedMember name="TotalSales" formatString="##,##,##,###.00" formula="[Measures].[Quantity] * [Measures].[Average Selling Price]" dimension="Measures" visible="true">
|
101 |
<CalculatedMember name="Profit" caption="Profit" formula="[Measures].[Total Sales]-[Measures].[Transfer Price]" dimension="Measures" visible="true">
|
| 88 |
</CalculatedMember>
|
102 |
</CalculatedMember>
|
| 89 |
</Cube>
|
103 |
</Cube>
|
| 90 |
</Schema>
|
104 |
</Schema>
|