![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi, Please see the results below. I am getting the count for 'Total' as 0. I need to get 2 to be able to apply right calculations down the line. Please suggest a wat to achieve the right count for 'Total'. with set [Time set] as '{[Time].[Hierarchy].[Yr_Mo].&[200301], [Time].[Hierarchy].[Yr_Mo].&[200302]}' member [Time].[Hierarchy].[Total] as 'AGGREGATE([Time set])' select {[Time set],[Time].[Hierarchy].[Total]} on columns, {[Gender].[Hierarchy].children,[Gender].[Hierarchy]} on rows from [HR Model] where ([measures].[EmployeeCount]) 200301 200302 Total Count 1 1 0 Thanks, |
#3
| |||
| |||
|
|
Here is the my MDX. Please ignore the MDX in my earlier post. It has typos etc. I want to make the "Total" the parent for '200301' & '200302' and get the count as 2. For some reason, it does not seem to understand it as the parent & returns 0. I want to see 2 as i created 2 children for it. I am not sure if there are MDX functions that can create on the fly. with Set [Time set] as '{[Time].[Hierarchy].[Yr_Mo].&[200301], [Time].[Hierarchy].[Yr_Mo].&[200302]}' member [Time].[Hierarchy].[Total] as 'AGGREGATE([Time set])' member [Measures].[Count] as 'count(Descendants([Time].CurrentMember,[Time].[Hierarchy].[Yr_Mo]))' select {[Time set],[Time].[Hierarchy].[Total]}on columns, [Measures].[Count] on rows from [HR Model] 200301 200302 Total Count 1 1 0 Thanks, "Prasad" wrote: Hi, Please see the results below. I am getting the count for 'Total' as 0. I need to get 2 to be able to apply right calculations down the line. Please suggest a wat to achieve the right count for 'Total'. with set [Time set] as '{[Time].[Hierarchy].[Yr_Mo].&[200301], [Time].[Hierarchy].[Yr_Mo].&[200302]}' member [Time].[Hierarchy].[Total] as 'AGGREGATE([Time set])' select {[Time set],[Time].[Hierarchy].[Total]} on columns, {[Gender].[Hierarchy].children,[Gender].[Hierarchy]} on rows from [HR Model] where ([measures].[EmployeeCount]) 200301 200302 Total Count 1 1 0 Thanks, |
![]() |
| Thread Tools | |
| Display Modes | |
| |