largeselection
Active Member
- Joined
- Aug 4, 2008
- Messages
- 358
Hello,
I'm using Excel 2010 with an OLAP cube and I need some help with named sets via MDX. Is it possible to create a named set which basically groups and subtotals data? So if I have 10 employees and they are equally divided in 2 states is it possible to create a named set which is like the below:
Original Data:
Emp1-NJ
Emp2-CT
Emp3-NJ
Emp4-CT
Emp5-NJ
Emp6-CT
Emp7-NJ
Emp8-CT
Emp9-NJ
Emp10-CT
New Named Set:
NJ Total of Emp1, Emp3, Emp5, Emp7, Emp9
Emp1
Emp3
Emp5
Emp7
Emp9
CT Total of Emp2, Emp4, Emp6, Emp8, Emp10
Emp2
Emp4
Emp6
Emp8
Emp10
Currently I'm able to create a named set that can do this for one group as below:
For example this is an example of the NJ group
That creates a set that is comprised of just the 5 employees in NJ and the subtotal of just those 5 members.
Is it possible to have multiple groups like that, but in one set? I'd rather not have to make a table for each individual state.
Thanks!
I'm using Excel 2010 with an OLAP cube and I need some help with named sets via MDX. Is it possible to create a named set which basically groups and subtotals data? So if I have 10 employees and they are equally divided in 2 states is it possible to create a named set which is like the below:
Original Data:
Emp1-NJ
Emp2-CT
Emp3-NJ
Emp4-CT
Emp5-NJ
Emp6-CT
Emp7-NJ
Emp8-CT
Emp9-NJ
Emp10-CT
New Named Set:
NJ Total of Emp1, Emp3, Emp5, Emp7, Emp9
Emp1
Emp3
Emp5
Emp7
Emp9
CT Total of Emp2, Emp4, Emp6, Emp8, Emp10
Emp2
Emp4
Emp6
Emp8
Emp10
Currently I'm able to create a named set that can do this for one group as below:
For example this is an example of the NJ group
Code:
VisualTotals({([Employee].[Employee].[All]),([Employee].[Employee].&[473]),([Employee].[Employee].&[7945]),([Employee].[Employee].&[8464]),([Employee].[Employee].&[8564]),([Employee].[Employee].&[8796])})
That creates a set that is comprised of just the 5 employees in NJ and the subtotal of just those 5 members.
Is it possible to have multiple groups like that, but in one set? I'd rather not have to make a table for each individual state.
Thanks!