![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Can anyone offer some advice on creating a calculated member representing the sum of 'Following Siblings' of a measure, based on the current member of a dimension? I am trying to accomplish this with the following statement to no avail. member [Measures].[CalcMeasure] as 'Sum(Filter({[Measures].[TheMeasure]}, [Dimension] <= [Dimension].CurrentMember), [Measures].[TheMeasure])', format = '#.##' Select NON EMPTY {[Measures].[TheMeasure], [Measures].[CalcMeasure]} on axis(0), NON EMPTY {[Dimension].[Level].members} on axis(1) tx, Tim |
#3
| |||
| |||
|
|
Are you trying to do following siblings, or previous siblings? It kind of looks like you're trying to do previous siblings based on what I see in your post. If you want to get previous siblings, something like: with member [measures].[mycalc] as 'SUM({[Education Level].CurrentMember.FirstSibling : [Education Level].CurrentMember},[measures].[store sales])' select {[measures].[store sales],[measures].[mycalc]} on columns, {[Education Level].[All Education Level].children} on rows from sales If you want following siblings: with member [measures].[mycalc] as 'SUM({[Education Level].CurrentMember : [Education Level].LastSibling},[measures].[store sales])' select {[measures].[store sales],[measures].[mycalc]} on columns, {[Education Level].[All Education Level].children} on rows from sales Keep in mind, in the above queries, currentmember is the anchor point. If you don't want to include current member in what you're doing, you can use CurrentMember.PrevMember or CurrentMember.NextMember depending upon which of the two you're trying to do. Good luck. - Phil "Tim Chapla" wrote: Can anyone offer some advice on creating a calculated member representing the sum of 'Following Siblings' of a measure, based on the current member of a dimension? I am trying to accomplish this with the following statement to no avail. member [Measures].[CalcMeasure] as 'Sum(Filter({[Measures].[TheMeasure]}, [Dimension] <= [Dimension].CurrentMember), [Measures].[TheMeasure])', format = '#.##' Select NON EMPTY {[Measures].[TheMeasure], [Measures].[CalcMeasure]} on axis(0), NON EMPTY {[Dimension].[Level].members} on axis(1) tx, Tim |
#4
| |||
| |||
|
|
Are you trying to do following siblings, or previous siblings? It kind of looks like you're trying to do previous siblings based on what I see in your post. If you want to get previous siblings, something like: with member [measures].[mycalc] as 'SUM({[Education Level].CurrentMember.FirstSibling : [Education Level].CurrentMember},[measures].[store sales])' select {[measures].[store sales],[measures].[mycalc]} on columns, {[Education Level].[All Education Level].children} on rows from sales If you want following siblings: with member [measures].[mycalc] as 'SUM({[Education Level].CurrentMember : [Education Level].LastSibling},[measures].[store sales])' select {[measures].[store sales],[measures].[mycalc]} on columns, {[Education Level].[All Education Level].children} on rows from sales Keep in mind, in the above queries, currentmember is the anchor point. If you don't want to include current member in what you're doing, you can use CurrentMember.PrevMember or CurrentMember.NextMember depending upon which of the two you're trying to do. Good luck. - Phil "Tim Chapla" wrote: Can anyone offer some advice on creating a calculated member representing the sum of 'Following Siblings' of a measure, based on the current member of a dimension? I am trying to accomplish this with the following statement to no avail. member [Measures].[CalcMeasure] as 'Sum(Filter({[Measures].[TheMeasure]}, [Dimension] <= [Dimension].CurrentMember), [Measures].[TheMeasure])', format = '#.##' Select NON EMPTY {[Measures].[TheMeasure], [Measures].[CalcMeasure]} on axis(0), NON EMPTY {[Dimension].[Level].members} on axis(1) tx, Tim |
#5
| |||
| |||
|
|
Can anyone offer some advice on creating a calculated member representing the sum of 'Following Siblings' of a measure, based on the current member of a dimension? I am trying to accomplish this with the following statement to no avail. member [Measures].[CalcMeasure] as 'Sum(Filter({[Measures].[TheMeasure]}, [Dimension].Properties("OrderByID") <= [Dimension].CurrentMember.Properties("OrderByID")), [Measures].[TheMeasure])', format = '#.##' Select NON EMPTY {[Measures].[TheMeasure], [Measures].[CalcMeasure]} on axis(0), NON EMPTY {[Dimension].[Level].members} on axis(1) tx, Tim |
![]() |
| Thread Tools | |
| Display Modes | |
| |