Showing posts with label dimensions. Show all posts
Showing posts with label dimensions. Show all posts

Friday, March 9, 2012

Defining Hirarchies Accross Dimensions

I have a cube whose dimensions include Product and Product Group. The Product Group has a Many-To-Many relationship with the cube through a bridge table to the Product dimension. Whenever I want to see the sales for product by product group on the cube browser I associate these two dimensions manually (dragging and dropping to create a hierarchy). Is it possible to define this hierarchy in the Product or Product Group dimension? Thanks in advance

+ Product Group

++++ Product

No, it is not possible to create a hierarchy spawns several dimensions.

But on the other side, try to see is there way you might be able to model your Product dimension to include ProductGroup attribute in it.

Edward.
--
This posting is provided "AS IS" with no warranties, and confers no rights.

|||

Thanks,

I know you should include these things in the product dimension, but the thing is that according to the business rules, these product groups could be anything because the users define these dynamically: regional areas, brands, etc. Moreover, a product could belong to many product groups and viceversa. This is why I had to create the group as a separate dimension.

Wednesday, March 7, 2012

Defining a named set

I have built a cube and I want to add a named set. Following dimensions are important: suscriber and handset. The set I want to create should contain only those subscribers for which the handset is different from the handset from the month before.

I tried to use the filter function resulting in the following:

filter([Dim Subscriber].[Subscriber].[Subscriber].members,([Time].[Month],[Dim Handset].[Dim Handset].[Dim Handset])<>([Time].[Month].prevmember,[Dim Handset].[Dim Handset].[Dim Handset]))

But deploying the cube returns the error message that "<>" cannot be used with sets...

Can anybody help me? Thanks in advance...

Regards

Joos

Use MemberValue for handset

(See help at ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/mdxref9/html/f9b2af16-2b81-48e4-ae81-99f64e4bbc98.htm in Books online).

|||

But then I have to define a specific handset member. I want only those subscribers for which the handset in the current month is different from the month before. Maybe I do have to use the measure base, which simply counts all subscribers?

filter([Dim Subscriber].[Subscriber].[Subscriber].members,([Time].[Month],[Dim Handset].[Dim Handset].[Dim Handset],[Measures].[Base])<>([Time].[Month].prevmember,[Dim Handset].[Dim Handset].[Dim Handset],[Measures].[Base]))

But this returns the error: Error 1 The '<>' operator cannot be used with sets.

|||

You mentioned that [Dim Subscriber] and [Dim Handset] dimensions are important, but didn't describe the fact table data. Anyway, assuming that there are only fact records in a given month for valid combinations of Subscriber and Handset, it's still not clear how you define the current month. So, assuming that the current month is the last in the [Time].[Month] hierarchy:

>>

Extract(Filter(NonEmpty([Dim Subscriber].[Subscriber].[Subscriber].Members

* [Dim Handset].[Handset].[Handset].Members * Tail([Time].[Month].[Month].Members),

{[Measures].[Base]}),

IsEmpty(([Measures].[Base], [Time].[Month].PrevMember))),

[Dim Subscriber].[Subscriber])

>>