Showing posts with label dimension. Show all posts
Showing posts with label dimension. Show all posts

Sunday, March 25, 2012

Creating Time Dimension for seconds

I'm creating analysis cubes on data that needs to reflect it's distribution over time during a 4 hour period.

I'd like to create a Time Dimension for "Every 15 seconds"

I've already got a DIM_Time table that includes actual event times (down to milliseconds)

Do I just need to create fields on that data for the 0:15 block that the particular event falls in, and create records for every 0:15 even if there isn't a related row in the measures table?

So that...

Measures
ID TimeId Measure
1 1 100
2 2 200

DIM_Time
TimeId Time
1 0:01.1234
2 0:31.2345
3 0:15
4 0:30
5 0:45
6 1:00
7 1:15
etc...

Hi Greg,

You're on the right track. The reason you would put the 15 second block even if there isn't an actual time for that is later on down the road there may be a fact for that and you would simply add the fact without have to also add the dimension member. You also may want to see for some reason the times that don't have data.

Depending on the requirements, I might break the Min and Seconds out in seperate fields. Like

TimeID Hour Min Sec Actual Time

1 0 0 0 0:10:00

2 0 0 15

3 0 0 45

4 0 1 0

Depending if the facts needs to roll up to a Min. and Hour.

Hope this helps,

David Botzenhart

|||Thanks! I appreciate your clarifications on the table structure

Thursday, March 8, 2012

Creating report based on parent-child dimension

Hi

I have a problem to create a report based on a parent child-dimension

When I go to reporting services, and I create a new report based on a cube, I drag my parent-child dimension to my data-layout. Then the dimension is immediatily ragged down.

Anyone an idea to solve this.

You need to group the data on the UniqueName property and set the parent group expression to the ParentUniqueName property.|||Does anyone have an example to create a report based on a parent-child dimensions

Thx|||Brian

I changed the report with the grouping on uniquename and the parent group on parentuniquename

But now I got only the top level

How can I drill down?
|||I have the same problem and didnt' find a solution for it. What I really want are the little +/- signs so i can open/close the children of the parent.
Didn't find anything ... what I do now is ident the children. This can be done using an expressing in the value property and using the LevelNumber to add spaces in front of the value ...
Not quit what I want ....
If you find a solution please share it here ...|||

hello,

I have a similar problem in RS2005:

In my report I see all levels in one column (How did g4rc manage to see only top level?...). However they are shown in a way that I think that if I only could get it to toggle correctly it will work out fine...

I would like my P/C dimensionto display just as it does when I use AS. Expanding top level (by pressing +), viewing next level down where I can "open" (by pressing +) next level and so on. Does anyone know how this is done or suggestions on how to solve it?

This is the kind of display I would like:

-A 100


-B 50
D 25
E 25


+C 50

Sincerely,

|||

Unfortunately, I’ve now these problems.

To solve these problems I followed these steps:

1. Alter the mdx query

2. Define the parent group in the report layout

3. Define the toggle item

1. Alter the mdx query

a. You should add a calculated member that gets the parent of your current member. Look to the following query (the dimension “Conta Raz?o” is a parent-child dimension)

WITH

MEMBER [Measures].[Conta Raz?o Parent Label] as '[ContaRaz?o].[Default Hierarchy].CurrentMember.Parent.MEMBER_CAPTION'

SELECT

{ [Measures].[Real], [Measures].[Conta Raz?o Parent Label]} ON COLUMNS,

NON EMPTY {DESCENDANTS([Conta Raz?o].[Default Hierarchy])} ON ROWS

FROM [Controlo Or?amental]

2. Define the parent group in the report layout

a) Select the group in your table, “edit group”, and in “parent group” property select the field that contains the parent of your dimension member (in my case, I select the “=Fields!Conta_Raz?o_Parent_Label.Value”; the query above has a calculated member that gets the parent of the current member )

3. Define the toggle item

a. Select the group in your table, and the “hidden property” of “visibility” should have “=IIF(Level()=0, False,True)” – this means that only the “first parent” is visible

b. In the “toggleItem property select the name of the textbox that contains “the members of the parent-child dimension”)

I hope this is useful for you.

Telmo Moreira

|||

Telmo Moreira wrote:

Unfortunately, I’ve now these problems.

To solve these problems I follow these steps:

1. Alter the mdx query

2. Define the parent group in the report layout

3. Define the toggle item

1. Alter the mdx query

a. You should add a calculated member that gets the parent of your current member. Look to the following query (the dimension “Conta Raz?o” is a parent-child dimension)

WITH

MEMBER [Measures].[Conta Raz?o Parent Label] as '[ContaRaz?o].[Default Hierarchy].CurrentMember.Parent.MEMBER_CAPTION'

SELECT

{ [Measures].[Real} ON COLUMNS,

NON EMPTY {DESCENDANTS([Conta Raz?o].[Default Hierarchy])} ON ROWS

FROM [Controlo Or?amental]

2. Define the parent group in the report layout

a) Select the group in your table, “edit group”, and in “parent group” property select the field that contains the parent of your dimension member (in my case, I select the “=Fields!Conta_Raz?o_Parent_Label.Value”; the query above has a calculated member that gets the parent of the current member )

3. Define the toggle item

a. Select the group in your table, and in the “properties window” the “hidden property” of “visibility” should have “=IIF(Level()=0, False,True)” – this means that only the “first parent” is visible

b. In the “toggleItem property select the name of the textbox that contains “the members of the parent-child dimension”)

I hope this is useful for you.

Telmo Moreira

Yes this is realy helpfull. But next when you collapse one its straight under the parent one. i want it more to the right. How can i do that for all levels under the parent level?

Kind regards,

Rob

|||

Hi,

In my previous post, I forgot to talk about the "padding property". So, in the textbox that contains “the members of the parent-child dimension”, select the "left property" of the "padding" in the "window properties" and write :
=Level() * 15 & "pt" (Note that this is an expression.)
This means that we indent each member with 15 * LevelN spaces, where LevelN is the current level of that member.

Have a nice day ,


Telmo Moreira

|||

Hello Telmo,

Thanks for your answer!! That works great. Now i have another question. I am trying to do your example with the employees parent child hierarchy in Dim employee from the adventure work cube. And it work also with the toggling. But when a parent name is the same as a child I don’t see the child and is it is being aggregate with the parent. So when you expand one and you sum the child’s you miss some data because the child with the same name as the parent is not showing in the report. I have tried a lot but how can i solve this problem? In the dataset when i run the mdx query i see the child which i miss in the report. I hope you can help me!

Thanks,

Robbert

|||

Hello Robbert,

Try this:

Modify your mdx query and instead of getting the "member caption" of the parent you should get the "unique name". Also you need to create a calculated member that gets the unique name of the current member. Then you must edit the group of your table and set the group expression to the dataset field that has the unique name of the current member; next set "the parent group expression" to the dataset field that has the unique name of the parent.

Take a look to the following query (the modifications are shown in bold)

WITH

MEMBER [Measures].[Conta Raz?o Parent Unique Name] as '[ContaRaz?o].[Default Hierarchy].CurrentMember.Parent.UniqueName'

MEMBER [Measures].[Conta Raz?o Current Unique Name] as '[ContaRaz?o].[Default Hierarchy].CurrentMember.UniqueName'

SELECT

{ [Measures].[Real], [Measures].[Conta Raz?o Current Unique Name], [Measures].[Conta Raz?o Parent Unique Name]} ON COLUMNS,

NON EMPTY {DESCENDANTS([Conta Raz?o].[Default Hierarchy])} ON ROWS

FROM [Controlo Or?amental]

I hope this solves your problem.

Best regards,

Telmo Moreira

|||

Hello Telmo,

Your Answer solved my problem!! Your great. Thanks for your answer.

Best regards,

Robbert

|||

Hello Telmo,

Everything works fine and all children will be shown. But when a parent has a child there is a toggle item (+) before the parent name. But when a parent has no child there is no toggle item (+) before the parent name. This look weird because it is not easy to see which level is showing. So I want before all members a toggle item (+) also when there is no child. I think this looks much better. But how can I do that? I hope you will help me one more time.

Best regards,

Robbert

|||

Hello Robbert,

I think that It's not possible, because, in this case, the toggle item (+) exists if the member has any child, i.e., there is some kind of group. So, I think that It's not possible. If anyone knows how to do please let me know.

Best regards,

Telmo Moreira

|||

Hello Robbert,

I have good news for you!

You want that every member should have a toggle item (+), even that member has no child, right?

So try this:

1. Insert a new row below the table group

2. the row should have a small height (say 0,1cm)

3. Select the entire row and set the "hidden property" of "visibility" to True. The "toggleitem property" should have the name of the texbox that contains the members of the parent-child dimension.

4. Et voilá... when we expand a member that has any child, we also expand that row; if the member has no child, only the row is expanded. It means that always exist the (+) before a member.

I think this solves your problem.

Best regards,

Telmo Moreira

Creating report based on parent-child dimension

Hi

I have a problem to create a report based on a parent child-dimension

When I go to reporting services, and I create a new report based on a cube, I drag my parent-child dimension to my data-layout. Then the dimension is immediatily ragged down.

Anyone an idea to solve this.You need to group the data on the UniqueName property and set the parent group expression to the ParentUniqueName property.|||Does anyone have an example to create a report based on a parent-child dimensions

Thx|||Brian

I changed the report with the grouping on uniquename and the parent group on parentuniquename

But now I got only the top level

How can I drill down?|||I have the same problem and didnt' find a solution for it. What I really want are the little +/- signs so i can open/close the children of the parent.
Didn't find anything ... what I do now is ident the children. This can be done using an expressing in the value property and using the LevelNumber to add spaces in front of the value ...
Not quit what I want ....
If you find a solution please share it here ...|||

hello,

I have a similar problem in RS2005:

In my report I see all levels in one column (How did g4rc manage to see only top level?...). However they are shown in a way that I think that if I only could get it to toggle correctly it will work out fine...

I would like my P/C dimensionto display just as it does when I use AS. Expanding top level (by pressing +), viewing next level down where I can "open" (by pressing +) next level and so on. Does anyone know how this is done or suggestions on how to solve it?

This is the kind of display I would like:

-A 100


-B 50
D 25
E 25


+C 50

Sincerely,

|||

Unfortunately, I’ve now these problems.

To solve these problems I followed these steps:

1. Alter the mdx query

2. Define the parent group in the report layout

3. Define the toggle item

1. Alter the mdx query

a. You should add a calculated member that gets the parent of your current member. Look to the following query (the dimension “Conta Raz?o” is a parent-child dimension)

WITH

MEMBER [Measures].[Conta Raz?o Parent Label] as '[ContaRaz?o].[Default Hierarchy].CurrentMember.Parent.MEMBER_CAPTION'

SELECT

{ [Measures].[Real], [Measures].[Conta Raz?o Parent Label]} ON COLUMNS,

NON EMPTY {DESCENDANTS([Conta Raz?o].[Default Hierarchy])} ON ROWS

FROM [Controlo Or?amental]

2. Define the parent group in the report layout

a) Select the group in your table, “edit group”, and in “parent group” property select the field that contains the parent of your dimension member (in my case, I select the “=Fields!Conta_Raz?o_Parent_Label.Value”; the query above has a calculated member that gets the parent of the current member )

3. Define the toggle item

a. Select the group in your table, and the “hidden property” of “visibility” should have “=IIF(Level()=0, False,True)” – this means that only the “first parent” is visible

b. In the “toggleItem property select the name of the textbox that contains “the members of the parent-child dimension”)

I hope this is useful for you.

Telmo Moreira

|||

Telmo Moreira wrote:

Unfortunately, I’ve now these problems.

To solve these problems I follow these steps:

1. Alter the mdx query

2. Define the parent group in the report layout

3. Define the toggle item

1. Alter the mdx query

a. You should add a calculated member that gets the parent of your current member. Look to the following query (the dimension “Conta Raz?o” is a parent-child dimension)

WITH

MEMBER [Measures].[Conta Raz?o Parent Label] as '[ContaRaz?o].[Default Hierarchy].CurrentMember.Parent.MEMBER_CAPTION'

SELECT

{ [Measures].[Real} ON COLUMNS,

NON EMPTY {DESCENDANTS([Conta Raz?o].[Default Hierarchy])} ON ROWS

FROM [Controlo Or?amental]

2. Define the parent group in the report layout

a) Select the group in your table, “edit group”, and in “parent group” property select the field that contains the parent of your dimension member (in my case, I select the “=Fields!Conta_Raz?o_Parent_Label.Value”; the query above has a calculated member that gets the parent of the current member )

3. Define the toggle item

a. Select the group in your table, and in the “properties window” the “hidden property” of “visibility” should have “=IIF(Level()=0, False,True)” – this means that only the “first parent” is visible

b. In the “toggleItem property select the name of the textbox that contains “the members of the parent-child dimension”)

I hope this is useful for you.

Telmo Moreira

Yes this is realy helpfull. But next when you collapse one its straight under the parent one. i want it more to the right. How can i do that for all levels under the parent level?

Kind regards,

Rob

|||

Hi,

In my previous post, I forgot to talk about the "padding property". So, in the textbox that contains “the members of the parent-child dimension”, select the "left property" of the "padding" in the "window properties" and write :
=Level() * 15 & "pt" (Note that this is an expression.)
This means that we indent each member with 15 * LevelN spaces, where LevelN is the current level of that member.

Have a nice day ,


Telmo Moreira

|||

Hello Telmo,

Thanks for your answer!! That works great. Now i have another question. I am trying to do your example with the employees parent child hierarchy in Dim employee from the adventure work cube. And it work also with the toggling. But when a parent name is the same as a child I don’t see the child and is it is being aggregate with the parent. So when you expand one and you sum the child’s you miss some data because the child with the same name as the parent is not showing in the report. I have tried a lot but how can i solve this problem? In the dataset when i run the mdx query i see the child which i miss in the report. I hope you can help me!

Thanks,

Robbert

|||

Hello Robbert,

Try this:

Modify your mdx query and instead of getting the "member caption" of the parent you should get the "unique name". Also you need to create a calculated member that gets the unique name of the current member. Then you must edit the group of your table and set the group expression to the dataset field that has the unique name of the current member; next set "the parent group expression" to the dataset field that has the unique name of the parent.

Take a look to the following query (the modifications are shown in bold)

WITH

MEMBER [Measures].[Conta Raz?o Parent Unique Name] as '[ContaRaz?o].[Default Hierarchy].CurrentMember.Parent.UniqueName'

MEMBER [Measures].[Conta Raz?o Current Unique Name] as '[ContaRaz?o].[Default Hierarchy].CurrentMember.UniqueName'

SELECT

{ [Measures].[Real], [Measures].[Conta Raz?o Current Unique Name], [Measures].[Conta Raz?o Parent Unique Name]} ON COLUMNS,

NON EMPTY {DESCENDANTS([Conta Raz?o].[Default Hierarchy])} ON ROWS

FROM [Controlo Or?amental]

I hope this solves your problem.

Best regards,

Telmo Moreira

|||

Hello Telmo,

Your Answer solved my problem!! Your great. Thanks for your answer.

Best regards,

Robbert

|||

Hello Telmo,

Everything works fine and all children will be shown. But when a parent has a child there is a toggle item (+) before the parent name. But when a parent has no child there is no toggle item (+) before the parent name. This look weird because it is not easy to see which level is showing. So I want before all members a toggle item (+) also when there is no child. I think this looks much better. But how can I do that? I hope you will help me one more time.

Best regards,

Robbert

|||

Hello Robbert,

I think that It's not possible, because, in this case, the toggle item (+) exists if the member has any child, i.e., there is some kind of group. So, I think that It's not possible. If anyone knows how to do please let me know.

Best regards,

Telmo Moreira

|||

Hello Robbert,

I have good news for you!

You want that every member should have a toggle item (+), even that member has no child, right?

So try this:

1. Insert a new row below the table group

2. the row should have a small height (say 0,1cm)

3. Select the entire row and set the "hidden property" of "visibility" to True. The "toggleitem property" should have the name of the texbox that contains the members of the parent-child dimension.

4. Et voilá... when we expand a member that has any child, we also expand that row; if the member has no child, only the row is expanded. It means that always exist the (+) before a member.

I think this solves your problem.

Best regards,

Telmo Moreira

|||Hy everybody,

just another question...

Following your instructions it all works fine except for this:
I have a Hierarchy like
[-]1
[-]2
[+]4
5
3
Note that 4 and 5 or 2 and 3 that shuld be at the same leve appear not padded at the same distance (the problem is that [+]or[-] takes sone pixels).

Any Idea to solve!?
|||Sorry ;)

the hierarchy

[-]1
___[-]2
_______[+]4
_______ 5
___ 3

Creating report based on parent-child dimension

Hi

I have a problem to create a report based on a parent child-dimension

When I go to reporting services, and I create a new report based on a cube, I drag my parent-child dimension to my data-layout. Then the dimension is immediatily ragged down.

Anyone an idea to solve this.You need to group the data on the UniqueName property and set the parent group expression to the ParentUniqueName property.|||Does anyone have an example to create a report based on a parent-child dimensions

Thx|||Brian

I changed the report with the grouping on uniquename and the parent group on parentuniquename

But now I got only the top level

How can I drill down?|||I have the same problem and didnt' find a solution for it. What I really want are the little +/- signs so i can open/close the children of the parent.
Didn't find anything ... what I do now is ident the children. This can be done using an expressing in the value property and using the LevelNumber to add spaces in front of the value ...
Not quit what I want ....
If you find a solution please share it here ...|||

hello,

I have a similar problem in RS2005:

In my report I see all levels in one column (How did g4rc manage to see only top level?...). However they are shown in a way that I think that if I only could get it to toggle correctly it will work out fine...

I would like my P/C dimensionto display just as it does when I use AS. Expanding top level (by pressing +), viewing next level down where I can "open" (by pressing +) next level and so on. Does anyone know how this is done or suggestions on how to solve it?

This is the kind of display I would like:

-A 100


-B 50
D 25
E 25


+C 50

Sincerely,

|||

Unfortunately, I’ve now these problems.

To solve these problems I followed these steps:

1. Alter the mdx query

2. Define the parent group in the report layout

3. Define the toggle item

1. Alter the mdx query

a. You should add a calculated member that gets the parent of your current member. Look to the following query (the dimension “Conta Raz?o” is a parent-child dimension)

WITH

MEMBER [Measures].[Conta Raz?o Parent Label] as '[ContaRaz?o].[Default Hierarchy].CurrentMember.Parent.MEMBER_CAPTION'

SELECT

{ [Measures].[Real], [Measures].[Conta Raz?o Parent Label]} ON COLUMNS,

NON EMPTY {DESCENDANTS([Conta Raz?o].[Default Hierarchy])} ON ROWS

FROM [Controlo Or?amental]

2. Define the parent group in the report layout

a) Select the group in your table, “edit group”, and in “parent group” property select the field that contains the parent of your dimension member (in my case, I select the “=Fields!Conta_Raz?o_Parent_Label.Value”; the query above has a calculated member that gets the parent of the current member )

3. Define the toggle item

a. Select the group in your table, and the “hidden property” of “visibility” should have “=IIF(Level()=0, False,True)” – this means that only the “first parent” is visible

b. In the “toggleItem property select the name of the textbox that contains “the members of the parent-child dimension”)

I hope this is useful for you.

Telmo Moreira

|||

Telmo Moreira wrote:

Unfortunately, I’ve now these problems.

To solve these problems I follow these steps:

1. Alter the mdx query

2. Define the parent group in the report layout

3. Define the toggle item

1. Alter the mdx query

a. You should add a calculated member that gets the parent of your current member. Look to the following query (the dimension “Conta Raz?o” is a parent-child dimension)

WITH

MEMBER [Measures].[Conta Raz?o Parent Label] as '[ContaRaz?o].[Default Hierarchy].CurrentMember.Parent.MEMBER_CAPTION'

SELECT

{ [Measures].[Real} ON COLUMNS,

NON EMPTY {DESCENDANTS([Conta Raz?o].[Default Hierarchy])} ON ROWS

FROM [Controlo Or?amental]

2. Define the parent group in the report layout

a) Select the group in your table, “edit group”, and in “parent group” property select the field that contains the parent of your dimension member (in my case, I select the “=Fields!Conta_Raz?o_Parent_Label.Value”; the query above has a calculated member that gets the parent of the current member )

3. Define the toggle item

a. Select the group in your table, and in the “properties window” the “hidden property” of “visibility” should have “=IIF(Level()=0, False,True)” – this means that only the “first parent” is visible

b. In the “toggleItem property select the name of the textbox that contains “the members of the parent-child dimension”)

I hope this is useful for you.

Telmo Moreira

Yes this is realy helpfull. But next when you collapse one its straight under the parent one. i want it more to the right. How can i do that for all levels under the parent level?

Kind regards,

Rob

|||

Hi,

In my previous post, I forgot to talk about the "padding property". So, in the textbox that contains “the members of the parent-child dimension”, select the "left property" of the "padding" in the "window properties" and write :
=Level() * 15 & "pt" (Note that this is an expression.)
This means that we indent each member with 15 * LevelN spaces, where LevelN is the current level of that member.

Have a nice day ,


Telmo Moreira

|||

Hello Telmo,

Thanks for your answer!! That works great. Now i have another question. I am trying to do your example with the employees parent child hierarchy in Dim employee from the adventure work cube. And it work also with the toggling. But when a parent name is the same as a child I don’t see the child and is it is being aggregate with the parent. So when you expand one and you sum the child’s you miss some data because the child with the same name as the parent is not showing in the report. I have tried a lot but how can i solve this problem? In the dataset when i run the mdx query i see the child which i miss in the report. I hope you can help me!

Thanks,

Robbert

|||

Hello Robbert,

Try this:

Modify your mdx query and instead of getting the "member caption" of the parent you should get the "unique name". Also you need to create a calculated member that gets the unique name of the current member. Then you must edit the group of your table and set the group expression to the dataset field that has the unique name of the current member; next set "the parent group expression" to the dataset field that has the unique name of the parent.

Take a look to the following query (the modifications are shown in bold)

WITH

MEMBER [Measures].[Conta Raz?o Parent Unique Name] as '[ContaRaz?o].[Default Hierarchy].CurrentMember.Parent.UniqueName'

MEMBER [Measures].[Conta Raz?o Current Unique Name] as '[ContaRaz?o].[Default Hierarchy].CurrentMember.UniqueName'

SELECT

{ [Measures].[Real], [Measures].[Conta Raz?o Current Unique Name], [Measures].[Conta Raz?o Parent Unique Name]} ON COLUMNS,

NON EMPTY {DESCENDANTS([Conta Raz?o].[Default Hierarchy])} ON ROWS

FROM [Controlo Or?amental]

I hope this solves your problem.

Best regards,

Telmo Moreira

|||

Hello Telmo,

Your Answer solved my problem!! Your great. Thanks for your answer.

Best regards,

Robbert

|||

Hello Telmo,

Everything works fine and all children will be shown. But when a parent has a child there is a toggle item (+) before the parent name. But when a parent has no child there is no toggle item (+) before the parent name. This look weird because it is not easy to see which level is showing. So I want before all members a toggle item (+) also when there is no child. I think this looks much better. But how can I do that? I hope you will help me one more time.

Best regards,

Robbert

|||

Hello Robbert,

I think that It's not possible, because, in this case, the toggle item (+) exists if the member has any child, i.e., there is some kind of group. So, I think that It's not possible. If anyone knows how to do please let me know.

Best regards,

Telmo Moreira

|||

Hello Robbert,

I have good news for you!

You want that every member should have a toggle item (+), even that member has no child, right?

So try this:

1. Insert a new row below the table group

2. the row should have a small height (say 0,1cm)

3. Select the entire row and set the "hidden property" of "visibility" to True. The "toggleitem property" should have the name of the texbox that contains the members of the parent-child dimension.

4. Et voilá... when we expand a member that has any child, we also expand that row; if the member has no child, only the row is expanded. It means that always exist the (+) before a member.

I think this solves your problem.

Best regards,

Telmo Moreira

Creating report based on parent-child dimension

Hi

I have a problem to create a report based on a parent child-dimension

When I go to reporting services, and I create a new report based on a cube, I drag my parent-child dimension to my data-layout. Then the dimension is immediatily ragged down.

Anyone an idea to solve this.

You need to group the data on the UniqueName property and set the parent group expression to the ParentUniqueName property.|||Does anyone have an example to create a report based on a parent-child dimensions

Thx|||Brian

I changed the report with the grouping on uniquename and the parent group on parentuniquename

But now I got only the top level

How can I drill down?
|||I have the same problem and didnt' find a solution for it. What I really want are the little +/- signs so i can open/close the children of the parent.
Didn't find anything ... what I do now is ident the children. This can be done using an expressing in the value property and using the LevelNumber to add spaces in front of the value ...
Not quit what I want ....
If you find a solution please share it here ...|||

hello,

I have a similar problem in RS2005:

In my report I see all levels in one column (How did g4rc manage to see only top level?...). However they are shown in a way that I think that if I only could get it to toggle correctly it will work out fine...

I would like my P/C dimensionto display just as it does when I use AS. Expanding top level (by pressing +), viewing next level down where I can "open" (by pressing +) next level and so on. Does anyone know how this is done or suggestions on how to solve it?

This is the kind of display I would like:

-A 100


-B 50
D 25
E 25


+C 50

Sincerely,

|||

Unfortunately, I’ve now these problems.

To solve these problems I followed these steps:

1. Alter the mdx query

2. Define the parent group in the report layout

3. Define the toggle item

1. Alter the mdx query

a. You should add a calculated member that gets the parent of your current member. Look to the following query (the dimension “Conta Raz?o” is a parent-child dimension)

WITH

MEMBER [Measures].[Conta Raz?o Parent Label] as '[ContaRaz?o].[Default Hierarchy].CurrentMember.Parent.MEMBER_CAPTION'

SELECT

{ [Measures].[Real], [Measures].[Conta Raz?o Parent Label]} ON COLUMNS,

NON EMPTY {DESCENDANTS([Conta Raz?o].[Default Hierarchy])} ON ROWS

FROM [Controlo Or?amental]

2. Define the parent group in the report layout

a) Select the group in your table, “edit group”, and in “parent group” property select the field that contains the parent of your dimension member (in my case, I select the “=Fields!Conta_Raz?o_Parent_Label.Value”; the query above has a calculated member that gets the parent of the current member )

3. Define the toggle item

a. Select the group in your table, and the “hidden property” of “visibility” should have “=IIF(Level()=0, False,True)” – this means that only the “first parent” is visible

b. In the “toggleItem property select the name of the textbox that contains “the members of the parent-child dimension”)

I hope this is useful for you.

Telmo Moreira

|||

Telmo Moreira wrote:

Unfortunately, I’ve now these problems.

To solve these problems I follow these steps:

1. Alter the mdx query

2. Define the parent group in the report layout

3. Define the toggle item

1. Alter the mdx query

a. You should add a calculated member that gets the parent of your current member. Look to the following query (the dimension “Conta Raz?o” is a parent-child dimension)

WITH

MEMBER [Measures].[Conta Raz?o Parent Label] as '[ContaRaz?o].[Default Hierarchy].CurrentMember.Parent.MEMBER_CAPTION'

SELECT

{ [Measures].[Real} ON COLUMNS,

NON EMPTY {DESCENDANTS([Conta Raz?o].[Default Hierarchy])} ON ROWS

FROM [Controlo Or?amental]

2. Define the parent group in the report layout

a) Select the group in your table, “edit group”, and in “parent group” property select the field that contains the parent of your dimension member (in my case, I select the “=Fields!Conta_Raz?o_Parent_Label.Value”; the query above has a calculated member that gets the parent of the current member )

3. Define the toggle item

a. Select the group in your table, and in the “properties window” the “hidden property” of “visibility” should have “=IIF(Level()=0, False,True)” – this means that only the “first parent” is visible

b. In the “toggleItem property select the name of the textbox that contains “the members of the parent-child dimension”)

I hope this is useful for you.

Telmo Moreira

Yes this is realy helpfull. But next when you collapse one its straight under the parent one. i want it more to the right. How can i do that for all levels under the parent level?

Kind regards,

Rob

|||

Hi,

In my previous post, I forgot to talk about the "padding property". So, in the textbox that contains “the members of the parent-child dimension”, select the "left property" of the "padding" in the "window properties" and write :
=Level() * 15 & "pt" (Note that this is an expression.)
This means that we indent each member with 15 * LevelN spaces, where LevelN is the current level of that member.

Have a nice day ,


Telmo Moreira

|||

Hello Telmo,

Thanks for your answer!! That works great. Now i have another question. I am trying to do your example with the employees parent child hierarchy in Dim employee from the adventure work cube. And it work also with the toggling. But when a parent name is the same as a child I don’t see the child and is it is being aggregate with the parent. So when you expand one and you sum the child’s you miss some data because the child with the same name as the parent is not showing in the report. I have tried a lot but how can i solve this problem? In the dataset when i run the mdx query i see the child which i miss in the report. I hope you can help me!

Thanks,

Robbert

|||

Hello Robbert,

Try this:

Modify your mdx query and instead of getting the "member caption" of the parent you should get the "unique name". Also you need to create a calculated member that gets the unique name of the current member. Then you must edit the group of your table and set the group expression to the dataset field that has the unique name of the current member; next set "the parent group expression" to the dataset field that has the unique name of the parent.

Take a look to the following query (the modifications are shown in bold)

WITH

MEMBER [Measures].[Conta Raz?o Parent Unique Name] as '[ContaRaz?o].[Default Hierarchy].CurrentMember.Parent.UniqueName'

MEMBER [Measures].[Conta Raz?o Current Unique Name] as '[ContaRaz?o].[Default Hierarchy].CurrentMember.UniqueName'

SELECT

{ [Measures].[Real], [Measures].[Conta Raz?o Current Unique Name], [Measures].[Conta Raz?o Parent Unique Name]} ON COLUMNS,

NON EMPTY {DESCENDANTS([Conta Raz?o].[Default Hierarchy])} ON ROWS

FROM [Controlo Or?amental]

I hope this solves your problem.

Best regards,

Telmo Moreira

|||

Hello Telmo,

Your Answer solved my problem!! Your great. Thanks for your answer.

Best regards,

Robbert

|||

Hello Telmo,

Everything works fine and all children will be shown. But when a parent has a child there is a toggle item (+) before the parent name. But when a parent has no child there is no toggle item (+) before the parent name. This look weird because it is not easy to see which level is showing. So I want before all members a toggle item (+) also when there is no child. I think this looks much better. But how can I do that? I hope you will help me one more time.

Best regards,

Robbert

|||

Hello Robbert,

I think that It's not possible, because, in this case, the toggle item (+) exists if the member has any child, i.e., there is some kind of group. So, I think that It's not possible. If anyone knows how to do please let me know.

Best regards,

Telmo Moreira

|||

Hello Robbert,

I have good news for you!

You want that every member should have a toggle item (+), even that member has no child, right?

So try this:

1. Insert a new row below the table group

2. the row should have a small height (say 0,1cm)

3. Select the entire row and set the "hidden property" of "visibility" to True. The "toggleitem property" should have the name of the texbox that contains the members of the parent-child dimension.

4. Et voilá... when we expand a member that has any child, we also expand that row; if the member has no child, only the row is expanded. It means that always exist the (+) before a member.

I think this solves your problem.

Best regards,

Telmo Moreira

Creating report based on parent-child dimension

Hi

I have a problem to create a report based on a parent child-dimension

When I go to reporting services, and I create a new report based on a cube, I drag my parent-child dimension to my data-layout. Then the dimension is immediatily ragged down.

Anyone an idea to solve this.

You need to group the data on the UniqueName property and set the parent group expression to the ParentUniqueName property.|||Does anyone have an example to create a report based on a parent-child dimensions

Thx|||Brian

I changed the report with the grouping on uniquename and the parent group on parentuniquename

But now I got only the top level

How can I drill down?
|||I have the same problem and didnt' find a solution for it. What I really want are the little +/- signs so i can open/close the children of the parent.
Didn't find anything ... what I do now is ident the children. This can be done using an expressing in the value property and using the LevelNumber to add spaces in front of the value ...
Not quit what I want ....
If you find a solution please share it here ...|||

hello,

I have a similar problem in RS2005:

In my report I see all levels in one column (How did g4rc manage to see only top level?...). However they are shown in a way that I think that if I only could get it to toggle correctly it will work out fine...

I would like my P/C dimensionto display just as it does when I use AS. Expanding top level (by pressing +), viewing next level down where I can "open" (by pressing +) next level and so on. Does anyone know how this is done or suggestions on how to solve it?

This is the kind of display I would like:

-A 100


-B 50
D 25
E 25


+C 50

Sincerely,

|||

Unfortunately, I’ve now these problems.

To solve these problems I followed these steps:

1. Alter the mdx query

2. Define the parent group in the report layout

3. Define the toggle item

1. Alter the mdx query

a. You should add a calculated member that gets the parent of your current member. Look to the following query (the dimension “Conta Raz?o” is a parent-child dimension)

WITH

MEMBER [Measures].[Conta Raz?o Parent Label]as'[ContaRaz?o].[Default Hierarchy].CurrentMember.Parent.MEMBER_CAPTION'

SELECT

{ [Measures].[Real], [Measures].[Conta Raz?o Parent Label]}ONCOLUMNS,

NONEMPTY {DESCENDANTS([Conta Raz?o].[Default Hierarchy])}ONROWS

FROM [Controlo Or?amental]

2. Define the parent group in the report layout

a) Select the group in your table, “edit group”, and in “parent group” property select the field that contains the parent of your dimension member (in my case, I select the “=Fields!Conta_Raz?o_Parent_Label.Value”; the query above has a calculated member that gets the parent of the current member )

3. Define the toggle item

a. Select the group in your table, and the “hidden property” of “visibility” should have “=IIF(Level()=0, False,True)” – this means that only the “first parent” is visible

b. In the “toggleItem property select the name of the textbox that contains “the members of the parent-child dimension”)

I hope this is useful for you.

Telmo Moreira

|||

Telmo Moreira wrote:

Unfortunately, I’ve now these problems.

To solve these problems I follow these steps:

1. Alter the mdx query

2. Define the parent group in the report layout

3. Define the toggle item

1. Alter the mdx query

a. You should add a calculated member that gets the parent of your current member. Look to the following query (the dimension “Conta Raz?o” is a parent-child dimension)

WITH

MEMBER [Measures].[Conta Raz?o Parent Label]as'[ContaRaz?o].[Default Hierarchy].CurrentMember.Parent.MEMBER_CAPTION'

SELECT

{ [Measures].[Real}ONCOLUMNS,

NONEMPTY {DESCENDANTS([Conta Raz?o].[Default Hierarchy])}ONROWS

FROM [Controlo Or?amental]

2. Define the parent group in the report layout

a) Select the group in your table, “edit group”, and in “parent group” property select the field that contains the parent of your dimension member (in my case, I select the “=Fields!Conta_Raz?o_Parent_Label.Value”; the query above has a calculated member that gets the parent of the current member )

3. Define the toggle item

a. Select the group in your table, and in the “properties window” the “hidden property” of “visibility” should have “=IIF(Level()=0, False,True)” – this means that only the “first parent” is visible

b. In the “toggleItem property select the name of the textbox that contains “the members of the parent-child dimension”)

I hope this is useful for you.

Telmo Moreira

Yes this is realy helpfull. But next when you collapse one its straight under the parent one. i want it more to the right. How can i do that for all levels under the parent level?

Kind regards,

Rob

|||

Hi,

In my previous post, I forgot to talk about the "padding property". So, in the textbox that contains “the members of the parent-child dimension”, select the "left property" of the "padding" in the "window properties" and write :
=Level() * 15 & "pt" (Note that this is an expression.)
This means that we indent each member with 15 * LevelN spaces, where LevelN is the current level of that member.

Have a nice day ,


Telmo Moreira

|||

Hello Telmo,

Thanks for your answer!! That works great. Now i have another question. I am trying to do your example with the employees parent child hierarchy in Dim employee from the adventure work cube. And it work also with the toggling. But when a parent name is the same as a child I don’t see the child and is it is being aggregate with the parent. So when you expand one and you sum the child’s you miss some data because the child with the same name as the parent is not showing in the report. I have tried a lot but how can i solve this problem? In the dataset when i run the mdx query i see the child which i miss in the report. I hope you can help me!

Thanks,

Robbert

|||

HelloRobbert,

Try this:

Modify your mdx query and instead of getting the "member caption" of the parent you should get the "unique name". Also you need to create a calculated member that gets the unique name of the current member. Then you must edit the group of your table and set the group expression to the dataset field that has the unique name of the current member; next set "the parent group expression" to the dataset field that has the unique name of the parent.

Take a look to the following query (the modifications are shown in bold)

WITH

MEMBER [Measures].[Conta Raz?o Parent Unique Name]as'[ContaRaz?o].[Default Hierarchy].CurrentMember.Parent.UniqueName'

MEMBER [Measures].[Conta Raz?o Current Unique Name]as'[ContaRaz?o].[Default Hierarchy].CurrentMember.UniqueName'

SELECT

{ [Measures].[Real], [Measures].[Conta Raz?o Current Unique Name], [Measures].[Conta Raz?o Parent Unique Name]} ONCOLUMNS,

NONEMPTY {DESCENDANTS([Conta Raz?o].[Default Hierarchy])}ONROWS

FROM [Controlo Or?amental]

I hope this solves your problem.

Best regards,

Telmo Moreira

|||

Hello Telmo,

Your Answer solved my problem!! Your great. Thanks for your answer.

Best regards,

Robbert

|||

Hello Telmo,

Everything works fine and all children will be shown. But when a parent has a child there is a toggle item (+) before the parent name. But when a parent has no child there is no toggle item (+) before the parent name. This look weird because it is not easy to see which level is showing. So I want before all members a toggle item (+) also when there is no child. I think this looks much better. But how can I do that? I hope you will help me one more time.

Best regards,

Robbert

|||

Hello Robbert,

I think that It's not possible, because, in this case, the toggle item (+) exists if the member has any child, i.e., there is some kind of group. So, I think that It's not possible. If anyone knows how to do please let me know.

Best regards,

Telmo Moreira

|||

Hello Robbert,

I have good news for you!

You want that every member should have a toggle item (+), even that member has no child, right?

So try this:

1. Insert a new row below the table group

2. the row should have a small height (say 0,1cm)

3. Select the entire row and set the "hidden property" of "visibility" to True. The "toggleitem property" should have the name of the texbox that contains the members of the parent-child dimension.

4. Et voilá... when we expand a member that has any child, we also expand that row; if the member has no child, only the row is expanded. It means that always exist the (+) before a member.

I think this solves your problem.

Best regards,

Telmo Moreira

Creating report based on parent-child dimension

Hi

I have a problem to create a report based on a parent child-dimension

When I go to reporting services, and I create a new report based on a cube, I drag my parent-child dimension to my data-layout. Then the dimension is immediatily ragged down.

Anyone an idea to solve this.

You need to group the data on the UniqueName property and set the parent group expression to the ParentUniqueName property.|||Does anyone have an example to create a report based on a parent-child dimensions

Thx|||Brian

I changed the report with the grouping on uniquename and the parent group on parentuniquename

But now I got only the top level

How can I drill down?
|||I have the same problem and didnt' find a solution for it. What I really want are the little +/- signs so i can open/close the children of the parent.
Didn't find anything ... what I do now is ident the children. This can be done using an expressing in the value property and using the LevelNumber to add spaces in front of the value ...
Not quit what I want ....
If you find a solution please share it here ...|||

hello,

I have a similar problem in RS2005:

In my report I see all levels in one column (How did g4rc manage to see only top level?...). However they are shown in a way that I think that if I only could get it to toggle correctly it will work out fine...

I would like my P/C dimensionto display just as it does when I use AS. Expanding top level (by pressing +), viewing next level down where I can "open" (by pressing +) next level and so on. Does anyone know how this is done or suggestions on how to solve it?

This is the kind of display I would like:

-A 100


-B 50
D 25
E 25


+C 50

Sincerely,

|||

Unfortunately, I’ve now these problems.

To solve these problems I followed these steps:

1. Alter the mdx query

2. Define the parent group in the report layout

3. Define the toggle item

1. Alter the mdx query

a. You should add a calculated member that gets the parent of your current member. Look to the following query (the dimension “Conta Raz?o” is a parent-child dimension)

WITH

MEMBER [Measures].[Conta Raz?o Parent Label] as '[ContaRaz?o].[Default Hierarchy].CurrentMember.Parent.MEMBER_CAPTION'

SELECT

{ [Measures].[Real], [Measures].[Conta Raz?o Parent Label]} ON COLUMNS,

NON EMPTY {DESCENDANTS([Conta Raz?o].[Default Hierarchy])} ON ROWS

FROM [Controlo Or?amental]

2. Define the parent group in the report layout

a) Select the group in your table, “edit group”, and in “parent group” property select the field that contains the parent of your dimension member (in my case, I select the “=Fields!Conta_Raz?o_Parent_Label.Value”; the query above has a calculated member that gets the parent of the current member )

3. Define the toggle item

a. Select the group in your table, and the “hidden property” of “visibility” should have “=IIF(Level()=0, False,True)” – this means that only the “first parent” is visible

b. In the “toggleItem property select the name of the textbox that contains “the members of the parent-child dimension”)

I hope this is useful for you.

Telmo Moreira

|||

Telmo Moreira wrote:

Unfortunately, I’ve now these problems.

To solve these problems I follow these steps:

1. Alter the mdx query

2. Define the parent group in the report layout

3. Define the toggle item

1. Alter the mdx query

a. You should add a calculated member that gets the parent of your current member. Look to the following query (the dimension “Conta Raz?o” is a parent-child dimension)

WITH

MEMBER [Measures].[Conta Raz?o Parent Label] as '[ContaRaz?o].[Default Hierarchy].CurrentMember.Parent.MEMBER_CAPTION'

SELECT

{ [Measures].[Real} ON COLUMNS,

NON EMPTY {DESCENDANTS([Conta Raz?o].[Default Hierarchy])} ON ROWS

FROM [Controlo Or?amental]

2. Define the parent group in the report layout

a) Select the group in your table, “edit group”, and in “parent group” property select the field that contains the parent of your dimension member (in my case, I select the “=Fields!Conta_Raz?o_Parent_Label.Value”; the query above has a calculated member that gets the parent of the current member )

3. Define the toggle item

a. Select the group in your table, and in the “properties window” the “hidden property” of “visibility” should have “=IIF(Level()=0, False,True)” – this means that only the “first parent” is visible

b. In the “toggleItem property select the name of the textbox that contains “the members of the parent-child dimension”)

I hope this is useful for you.

Telmo Moreira

Yes this is realy helpfull. But next when you collapse one its straight under the parent one. i want it more to the right. How can i do that for all levels under the parent level?

Kind regards,

Rob

|||

Hi,

In my previous post, I forgot to talk about the "padding property". So, in the textbox that contains “the members of the parent-child dimension”, select the "left property" of the "padding" in the "window properties" and write :
=Level() * 15 & "pt" (Note that this is an expression.)
This means that we indent each member with 15 * LevelN spaces, where LevelN is the current level of that member.

Have a nice day ,


Telmo Moreira

|||

Hello Telmo,

Thanks for your answer!! That works great. Now i have another question. I am trying to do your example with the employees parent child hierarchy in Dim employee from the adventure work cube. And it work also with the toggling. But when a parent name is the same as a child I don’t see the child and is it is being aggregate with the parent. So when you expand one and you sum the child’s you miss some data because the child with the same name as the parent is not showing in the report. I have tried a lot but how can i solve this problem? In the dataset when i run the mdx query i see the child which i miss in the report. I hope you can help me!

Thanks,

Robbert

|||

Hello Robbert,

Try this:

Modify your mdx query and instead of getting the "member caption" of the parent you should get the "unique name". Also you need to create a calculated member that gets the unique name of the current member. Then you must edit the group of your table and set the group expression to the dataset field that has the unique name of the current member; next set "the parent group expression" to the dataset field that has the unique name of the parent.

Take a look to the following query (the modifications are shown in bold)

WITH

MEMBER [Measures].[Conta Raz?o Parent Unique Name] as '[ContaRaz?o].[Default Hierarchy].CurrentMember.Parent.UniqueName'

MEMBER [Measures].[Conta Raz?o Current Unique Name] as '[ContaRaz?o].[Default Hierarchy].CurrentMember.UniqueName'

SELECT

{ [Measures].[Real], [Measures].[Conta Raz?o Current Unique Name], [Measures].[Conta Raz?o Parent Unique Name]} ON COLUMNS,

NON EMPTY {DESCENDANTS([Conta Raz?o].[Default Hierarchy])} ON ROWS

FROM [Controlo Or?amental]

I hope this solves your problem.

Best regards,

Telmo Moreira

|||

Hello Telmo,

Your Answer solved my problem!! Your great. Thanks for your answer.

Best regards,

Robbert

|||

Hello Telmo,

Everything works fine and all children will be shown. But when a parent has a child there is a toggle item (+) before the parent name. But when a parent has no child there is no toggle item (+) before the parent name. This look weird because it is not easy to see which level is showing. So I want before all members a toggle item (+) also when there is no child. I think this looks much better. But how can I do that? I hope you will help me one more time.

Best regards,

Robbert

|||

Hello Robbert,

I think that It's not possible, because, in this case, the toggle item (+) exists if the member has any child, i.e., there is some kind of group. So, I think that It's not possible. If anyone knows how to do please let me know.

Best regards,

Telmo Moreira

|||

Hello Robbert,

I have good news for you!

You want that every member should have a toggle item (+), even that member has no child, right?

So try this:

1. Insert a new row below the table group

2. the row should have a small height (say 0,1cm)

3. Select the entire row and set the "hidden property" of "visibility" to True. The "toggleitem property" should have the name of the texbox that contains the members of the parent-child dimension.

4. Et voilá... when we expand a member that has any child, we also expand that row; if the member has no child, only the row is expanded. It means that always exist the (+) before a member.

I think this solves your problem.

Best regards,

Telmo Moreira

Wednesday, March 7, 2012

Creating Partions on Developer Edition

Hi,

I was trying to partition my cube built in MSAS 2005 Developer Edition based on time dimension, however I was running into a lot of issues.

I just read an article which states that cube partition is only possible on Enterprise Edition of MSAS 2005 can someone verify if it is true and if thats the case then why do they provide an option to partition the cube in the developer edition.

Thanks

You can create partitions on developer edition of SQL Server 2005/SSAS2005. Build partitions in BI-Developer Studio, process and check the cube in Management Studio after. Under the Cubes-folder, The cube and the measure group for that cube you can see the partitions.

Regards

Thomas Ivarsson

|||

Thomas,

I tried doing that, however if I try to create a partition using query binding and specify a select statement with a where clause. The SQL that MSAS 2005 generates when it builds the cube has a bunch of sub-selects and it fails to validate and so I am unble to build the cube with any new partitions

Thanks

|||

Developer Edition supports the functionallity of Enterprise Edition but with licensing limitations, so the problem is not related to the edition you are using. (Please see the licensing terms for details.) A more likely culprit is the relational provider you are using as it sounds like the provider does not support sub-selects. See http://msdn2.microsoft.com/en-us/library/ms175608.aspx for a list of supported relational providers.

|||

Ok. It works with the Dev Edition so your problem is probably not about the version of SQL Server. It can be as simple as to check if a key is text, integer or any other datatype. IN 2005 you can build SQL statements for partitions in the same way you write a where clause in TSQL.

Run the new profiler that catches all statements from SSAS2005 and see if any strange behavior appears.

Regards

Thomas Ivarsson

|||

Hi,

Thanks for the response guys.

Matt I had one quick question if I am able to process a cube using table binding as opposed to query binding to create partitions and the sql generated during processing of the cube does have sub selects and it does build the cube sucessfully I dont think I would have an issue with my provider correct?

Thomas : I am not quite clear about the part where you say " It can be as simple as to check if a key is text, integer or any other datatype" can you please expand on this

|||

I do these errors myself. A key is an integer but I write with a ' ' around it(or reverse). I do not think that my query bound partitions do subselects. It is a normal select query, with a where clause added for you, when I have tried it.

Regards

Thomas Ivarsson

|||If you are using one of the supported providers you should not have any problem. If you are not, it may be that some things are supported in sub-selects but other things are not so some queries may succeed while others fail. You should be able to see the queries the server is generating them and then you can check and see if they are supported by the provider.

Creating Partions on Developer Edition

Hi,

I was trying to partition my cube built in MSAS 2005 Developer Edition based on time dimension, however I was running into a lot of issues.

I just read an article which states that cube partition is only possible on Enterprise Edition of MSAS 2005 can someone verify if it is true and if thats the case then why do they provide an option to partition the cube in the developer edition.

Thanks

You can create partitions on developer edition of SQL Server 2005/SSAS2005. Build partitions in BI-Developer Studio, process and check the cube in Management Studio after. Under the Cubes-folder, The cube and the measure group for that cube you can see the partitions.

Regards

Thomas Ivarsson

|||

Thomas,

I tried doing that, however if I try to create a partition using query binding and specify a select statement with a where clause. The SQL that MSAS 2005 generates when it builds the cube has a bunch of sub-selects and it fails to validate and so I am unble to build the cube with any new partitions

Thanks

|||

Developer Edition supports the functionallity of Enterprise Edition but with licensing limitations, so the problem is not related to the edition you are using. (Please see the licensing terms for details.) A more likely culprit is the relational provider you are using as it sounds like the provider does not support sub-selects. See http://msdn2.microsoft.com/en-us/library/ms175608.aspx for a list of supported relational providers.

|||

Ok. It works with the Dev Edition so your problem is probably not about the version of SQL Server. It can be as simple as to check if a key is text, integer or any other datatype. IN 2005 you can build SQL statements for partitions in the same way you write a where clause in TSQL.

Run the new profiler that catches all statements from SSAS2005 and see if any strange behavior appears.

Regards

Thomas Ivarsson

|||

Hi,

Thanks for the response guys.

Matt I had one quick question if I am able to process a cube using table binding as opposed to query binding to create partitions and the sql generated during processing of the cube does have sub selects and it does build the cube sucessfully I dont think I would have an issue with my provider correct?

Thomas : I am not quite clear about the part where you say " It can be as simple as to check if a key is text, integer or any other datatype" can you please expand on this

|||

I do these errors myself. A key is an integer but I write with a ' ' around it(or reverse). I do not think that my query bound partitions do subselects. It is a normal select query, with a where clause added for you, when I have tried it.

Regards

Thomas Ivarsson

|||If you are using one of the supported providers you should not have any problem. If you are not, it may be that some things are supported in sub-selects but other things are not so some queries may succeed while others fail. You should be able to see the queries the server is generating them and then you can check and see if they are supported by the provider.

Creating Partions on Developer Edition

Hi,

I was trying to partition my cube built in MSAS 2005 Developer Edition based on time dimension, however I was running into a lot of issues.

I just read an article which states that cube partition is only possible on Enterprise Edition of MSAS 2005 can someone verify if it is true and if thats the case then why do they provide an option to partition the cube in the developer edition.

Thanks

You can create partitions on developer edition of SQL Server 2005/SSAS2005. Build partitions in BI-Developer Studio, process and check the cube in Management Studio after. Under the Cubes-folder, The cube and the measure group for that cube you can see the partitions.

Regards

Thomas Ivarsson

|||

Thomas,

I tried doing that, however if I try to create a partition using query binding and specify a select statement with a where clause. The SQL that MSAS 2005 generates when it builds the cube has a bunch of sub-selects and it fails to validate and so I am unble to build the cube with any new partitions

Thanks

|||

Developer Edition supports the functionallity of Enterprise Edition but with licensing limitations, so the problem is not related to the edition you are using. (Please see the licensing terms for details.) A more likely culprit is the relational provider you are using as it sounds like the provider does not support sub-selects. See http://msdn2.microsoft.com/en-us/library/ms175608.aspx for a list of supported relational providers.

|||

Ok. It works with the Dev Edition so your problem is probably not about the version of SQL Server. It can be as simple as to check if a key is text, integer or any other datatype. IN 2005 you can build SQL statements for partitions in the same way you write a where clause in TSQL.

Run the new profiler that catches all statements from SSAS2005 and see if any strange behavior appears.

Regards

Thomas Ivarsson

|||

Hi,

Thanks for the response guys.

Matt I had one quick question if I am able to process a cube using table binding as opposed to query binding to create partitions and the sql generated during processing of the cube does have sub selects and it does build the cube sucessfully I dont think I would have an issue with my provider correct?

Thomas : I am not quite clear about the part where you say " It can be as simple as to check if a key is text, integer or any other datatype" can you please expand on this

|||

I do these errors myself. A key is an integer but I write with a ' ' around it(or reverse). I do not think that my query bound partitions do subselects. It is a normal select query, with a where clause added for you, when I have tried it.

Regards

Thomas Ivarsson

|||If you are using one of the supported providers you should not have any problem. If you are not, it may be that some things are supported in sub-selects but other things are not so some queries may succeed while others fail. You should be able to see the queries the server is generating them and then you can check and see if they are supported by the provider.

Creating Parent Child Hierarchies

Hi
I have the following in my cube
Location Dimension containing LocationID and LocationName attributes.
Customer Dimension containing CustomerID,CustomerName....,LocationID
The LocationID in the Location Dimension and Customer Dimension are related to each other.
I want to create a hierarchy with the LocationName in the First Level and the CustomerName in the second level. How to I accomplish this? As i said I already have a relationship defined between the two tables.

Thanks and Regards
Guruprasad Karnik

This is not a recursive hierarchy from what you are describing.

You can find a recursive hierarchy in the employee table in the Adventure works sample data base that is a part of the SQL server 2005 installation. You use parent-child hierarchies with this type of primary key-foreign key relationship in the same table.

If you download the performance guide for SSAS2005 (see the first post in this forum) and have a look at page 82 and further(Referenced relationsships), you will find a lot of helpful information.

HTH

Thomas Ivarsson

Friday, February 17, 2012

Creating Dynamic dimension Security with Custom Procedure

Hi All,

We are trying to implement dynamic dimension security using a Custom procedure written in C#.

If we create a single entry in the return set everything works fine (See Below)

Microsoft.AnalysisServices.AdomdServer.Expression Expression = new Microsoft.AnalysisServices.AdomdServer.Expression();

Expression.ExpressionText = "[Sub Branch Id].[All Branch].[4]";

Microsoft.AnalysisServices.AdomdServer.Member Member = Expression.CalculateMdxObject(null).ToMember();

TupleBuilder.Add(Member);

SetBuilder.Add(TupleBuilder.ToTuple());

However when we try and add a second item to the Tuple builder the object returns the error : The 'Sub Branch Id' Hierarchy appears more than once in the tuple.

Code snippet :

{

Microsoft.AnalysisServices.AdomdServer.Expression Expression = new Microsoft.AnalysisServices.AdomdServer.Expression();

Expression.ExpressionText = "[Sub Branch Id].[All Branch].[2]";

Microsoft.AnalysisServices.AdomdServer.Member Member = Expression.CalculateMdxObject(null).ToMember();

TupleBuilder.Add(Member);

Expression=null;

Member=null;

}

{

Microsoft.AnalysisServices.AdomdServer.Expression Expression = new Microsoft.AnalysisServices.AdomdServer.Expression();

Expression.ExpressionText = "[Sub Branch Id].[All Branch].[3]";

Microsoft.AnalysisServices.AdomdServer.Member Member = Expression.CalculateMdxObject(null).ToMember();

TupleBuilder.Add(Member);

Expression=null;

Member=null;

}

SetBuilder.Add(TupleBuilder.ToTuple());

Please can some one help resolve this issue as its becoming critical for the project that we are currently working on, otherwise we will have to revisit the security model.

TIA

Hello,

most likely you don't create a new tuple for each new member. Create a new instance of TupleBuilder to resolve it.

Radim

|||

Thanks for the Help Radmin, It was that.

The source example we're using was from Teo Lacevs book, applied MS Analysis Services 2005. On Teo's Forum we have found the correct syntax (though not in C#), and it does work.

This is the link to the solution, http://prologika.com/CS/forums/thread/1861.aspx