MDX help with last non-empty


hi,

i have situation want use qtd accounts , last non-empty other accounts can't use account intelligence in case. i'm trying achieve same thing calculated members. want case when structure on accounts last non-empty used. however, haven't got far. can't last non-empty calculation working properly. here's code it:

  with member lastnonempty as iif(isempty([measures].[amount]), ([time].prevmember, [measures].[lastnonempty]), [measures].[amount])  
problem in total quarter lastnonempty isn't amount last non-empty month sum of months. time dimension years, half-years, quarters, months. i'm not mdx don't know how this.

mistake side. try mdx below..that give u right values

 

scope([time].[quarter].members,measures.[lastnonempty]);

this= (tail(nonempty([time].currentmember.children),1).item(0),measures.[lastnonempty]);

end scope;

 

hth


mona


SQL Server  >  SQL Server Analysis Services



Comments

Popular posts from this blog

Conditional formatting a graph vertical axis in SSRS 2012 charts

Register with Power BI failed

SQL server replication error Cannot find the dbo or user defined function........