![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi I have three dimensions named Product, Time, City and one measure sales. I want to know the average sales made in a particular city. Assume the product has only one level, City has one level city, and time has two level month and day. A simple SQL would look like this- select avg(sales) from sales_fact where intcityid=5 how can i do this using MDX. |
#3
| |||
| |||
|
|
Create a calculated member which is a count. Then have a calculated member which is Sales/Count. Look in Foodmart at the Profit calculated member -- it is Sales minus cost; your "avg" calculated member would be Sales divided by count. If you want, you can then hide the Count member so users dont' see it. -- Dave Wickert [MSFT] dwickert (AT) online (DOT) microsoft.com Program Manager BI SystemsTeam SQL BI Product Unit (Analysis Services) -- This posting is provided "AS IS" with no warranties, and confers no rights. "Hari" <Hari (AT) discussions (DOT) microsoft.com> wrote in message news:5CEA4094-337B-489E-8ECA-1B2884D5DFB2 (AT) microsoft (DOT) com... Hi I have three dimensions named Product, Time, City and one measure sales. I want to know the average sales made in a particular city. Assume the product has only one level, City has one level city, and time has two level month and day. A simple SQL would look like this- select avg(sales) from sales_fact where intcityid=5 how can i do this using MDX. |
#4
| |||
| |||
|
|
Create a calculated member which is a count. Then have a calculated member which is Sales/Count. Look in Foodmart at the Profit calculated member -- it is Sales minus cost; your "avg" calculated member would be Sales divided by count. If you want, you can then hide the Count member so users dont' see it. -- Dave Wickert [MSFT] dwickert (AT) online (DOT) microsoft.com Program Manager BI SystemsTeam SQL BI Product Unit (Analysis Services) -- This posting is provided "AS IS" with no warranties, and confers no rights. "Hari" <Hari (AT) discussions (DOT) microsoft.com> wrote in message news:5CEA4094-337B-489E-8ECA-1B2884D5DFB2 (AT) microsoft (DOT) com... Hi I have three dimensions named Product, Time, City and one measure sales. I want to know the average sales made in a particular city. Assume the product has only one level, City has one level city, and time has two level month and day. A simple SQL would look like this- select avg(sales) from sales_fact where intcityid=5 how can i do this using MDX. |
#5
| |||
| |||
|
|
Create a calculated member which is a count. Then have a calculated member which is Sales/Count. Look in Foodmart at the Profit calculated member -- it is Sales minus cost; your "avg" calculated member would be Sales divided by count. If you want, you can then hide the Count member so users dont' see it. -- Dave Wickert [MSFT] dwickert (AT) online (DOT) microsoft.com Program Manager BI SystemsTeam SQL BI Product Unit (Analysis Services) -- This posting is provided "AS IS" with no warranties, and confers no rights. "Hari" <Hari (AT) discussions (DOT) microsoft.com> wrote in message news:5CEA4094-337B-489E-8ECA-1B2884D5DFB2 (AT) microsoft (DOT) com... Hi I have three dimensions named Product, Time, City and one measure sales. I want to know the average sales made in a particular city. Assume the product has only one level, City has one level city, and time has two level month and day. A simple SQL would look like this- select avg(sales) from sales_fact where intcityid=5 how can i do this using MDX. |
![]() |
| Thread Tools | |
| Display Modes | |
| |