ssas - Mdx request get the first element of a tuple with datetime -


my mdx request gives me result:

enter image description here

for entities, i've multiple years 1 value, need first year entity (and others dimensions). i've tried use function .firstchild in year dimension return value year '2014' (first year in dimension). function .item() returns empty values:

select    non empty      {[measures].[value]} on columns  ,non empty      {         [entitefederal].[entitecode].[entitecode].allmembers*         [t].[year].[year].allmembers*         [t].[yeardate].[yeardate].allmembers     }   dimension properties      member_caption    ,member_unique_name    on rows [mycube]; 

hopefully working - tricky me test:

with    set [entyr]      generate     (       [entitefederal].[entitecode].[entitecode].members x      ,         x.currentmember       *          head         (           nonempty           (             [t].[year].[year].allmembers * [t].[yeardate].[yeardate].allmembers            ,x.currentmember           )         )     )  select    non empty      [measures].[value] on columns  ,non empty      [entyr] on rows [mycube]; 

Comments

Popular posts from this blog

javascript - Laravel datatable invalid JSON response -

java - Exception in thread "main" org.springframework.context.ApplicationContextException: Unable to start embedded container; -

sql server 2008 - My Sql Code Get An Error Of Msg 245, Level 16, State 1, Line 1 Conversion failed when converting the varchar value '8:45 AM' to data type int -