Re: Performance problem

Tech-Archive recommends: Fix windows errors by optimizing your registry



Sure

Calc1:
((Sum ( [dimDate].[Week].CurrentMember.Lag(3) : [dimDate].[Week].CurrentMember, [Measures].[SoldQuantity] ))
/
(Sum ( [dimDate].[Week].CurrentMember.Lag(4) : [dimDate].[Week].CurrentMember, [Measures].[StockQuantity]) / 4));

NumberItemsAbove4:
Count(
Filter(
NonEmptyCrossjoin(
Descendants([DimDate], ,LEAVES),
Descendants([DimSku], ,LEAVES),
Descendants([DimShop], ,LEAVES),
3
),
[Measures].[Calc1]>4
)
)

Debbus


"Jéjé" <willgart_A_@xxxxxxxxxxxxxx> wrote in message news:eNONNgoKHHA.5000@xxxxxxxxxxxxxxxxxxxxxxx
can you post the MDX query of your calculated member?
how the cube is aggregated?

"Debbus" <debbus@xxxxxxxxx> wrote in message
news:OcgirkmKHHA.1248@xxxxxxxxxxxxxxxxxxxxxxx
Hi,

I've built some simple cubes, but now i'm stuck in SSAS 2005.
I'm trying to build a retail cube with 3 Dimensions and 1 Fact.
D1: Store -> Area -> Country
D2: Sku -> ProductLevel4 -> Level3 -> Level2 -> Level1
D3: Week -> Year
F: StockQuantity, SoldQuantity

Attribute relations on dimensions are set.

I need to calculate the following: Sum of last 4 weeks of sold quantity
divided by the last 5 weeks of average stock quantity, for
every store/sku/week (all the leaves of the dimensions).
Based on that calculation, i want to count the number of times it is above
some number (say >4).
The performance on my test database (5000 fact rows) is good, but in
production (say 10 million rows) it sucks.

This is what i've tried:
Scenario1:
Added a create member (or create cell calculation) to the calculations tab
of the cube-editor. Only to find out this is used at
query-time.

Scenario2:
Added a new named calculation to the Facttable in DataSourceView. But i
cannot use MDX as the expression. At least not the
MDX-functions that i want to use.

Scenario3:
Create a view on SqlServer to do the calculation and use that in the cube.
That works, but why let SqlServer do all the work that
should be done by AS?
Besides, MDX has some function (TopPercent) that will be dificult to
implement in SQL.

Does anyone know this should be done in AS2005?
How can i add an (MDX) calculation on every row in the fact table at
process-time and speed up query-time?

Debbus




.



Relevant Pages

  • Re: Performance - Best Practices
    ... SP1 is applied on the server. ... I have also heard that parent child dimensions have a significant impact on ... I mean floating calculation and integer ... and the cube in front of this fact provide standard SUMS and DCount!) ...
    (microsoft.public.sqlserver.olap)
  • Re: Dynamic FORMAT_STRING for Measure
    ... Anyone who has looked at the AdventureWorks sample cube will probably ... FORMAT_STRING can now be defined with an MDX expression (in AS2K it was ... For example, in the Adventure Works cube, if you add this calculation to ...
    (microsoft.public.sqlserver.olap)
  • Spoof shared dimension for virtual cube
    ... just getting back into Analysis Services again, ... Two cubes, ... Cube1 has 10 more dimensions, ... I'm sure it's possible to get this result with MDX (which I'm still not ...
    (microsoft.public.sqlserver.olap)
  • MDX Range Queries
    ... I have a cube with multiple large dimensions. ... selection criteria is straight forward. ... Now when they select the 2nd page, i do not know how to build the MDX ...
    (microsoft.public.sqlserver.olap)
  • MDX Range Queries
    ... I have a cube with multiple large dimensions. ... selection criteria is straight forward. ... Now when they select the 2nd page, i do not know how to build the MDX ...
    (microsoft.public.sqlserver.olap)