![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I have a date dimension which is broken into levels year month day, then I have a measure called count, what I need to do is show the measure count for all but the lastchild of each of the levels. etc Date [measures].[count] -2003 (last child not shown) - Jan 2 - Feb 4 - March (last child not shown) - 1st 3 - 2nd 5 - 3rd 7 - 4th (last child not shown) I tried writing something like iif([Date].currentmember <> [date].currentmember.lastchild, [measures].[count], null) but this doesnt do anything so anyone have any ideas? cheers Dean |
#3
| |||
| |||
|
|
Hi Mosha thanks for your reply, I was aware of the is operator but when I wrote the code IIF( [Date monthly].CurrentMember IS [Date monthly].Parent.LastChild, NULL, Measures.[Carried Forward] ) using calculated member builder I got the error invalid token "IS" so I was not sure I was using it in the right context |
#4
| |||
| |||
|
|
I have now found a solution to the problem using iif([date monthly].currentmember.properties("ID") = [date monthly].currentmember.parent.lastchild.properties("ID"), 1, 0) |
|
now the problem is i only dont want to show the measure for the last child of each level so currentmember.parent.lastchild does not work as it will not show the measure for the last day in each month. so I need to say something like [date].[day].members.lastchild but you can not use lastchild with a set so any suggestions |
#5
| |||
| |||
|
|
I have now found a solution to the problem using iif([date monthly].currentmember.properties("ID") = [date monthly].currentmember.parent.lastchild.properties("ID"), 1, 0) Simpler boolean expression would be simply [date monthly].currentmember.properties("ID") = [date monthly].currentmember.parent.lastchild.properties("ID") now the problem is i only dont want to show the measure for the last child of each level so currentmember.parent.lastchild does not work as it will not show the measure for the last day in each month. so I need to say something like [date].[day].members.lastchild but you can not use lastchild with a set so any suggestions There are several ways to do it. For example Tail([date].[day].members, 1).Item(0) should produce last day. HTH, Mosha. |
![]() |
| Thread Tools | |
| Display Modes | |
| |