March 19, 2015 at 6:33 pm
How to get a set with lastchild of each parent in a hierarchy, please see the attach image
my MDX query :
select {[Measures].[H Movimientos Count]} on 0,
{descendants([D Movimientos].[Elemento - Movimiento].[Id Elemento].members, [D Movimientos].[Elemento - Movimiento].[Id Mov])} on 1
from [Test];
but this return all child 🙁
March 20, 2015 at 9:08 am
There is a LastChild() function you can use for that. Syntax can be found here: https://msdn.microsoft.com/en-us/library/ms145576.aspx
March 21, 2015 at 3:50 pm
yes i know that, but i need get all lastchild of each parent.
March 23, 2015 at 5:06 pm
with member [Measures].[Last Sibling]
as
(
[D Movimientos].[Elemento - Movimiento].currentmember.parent.lastchild.name
)
select{
[Measures].[H Movimientos Count]
,[Measures].[Last Sibling]
} on 0
,{
[D Movimientos].[Elemento - Movimiento].[Id Elemento]
} on 1
from[Test]
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply