rauljimenez
asked on
Mdx count measures
I want made a measures that count days between two dates, but the first date is same (2007-08-31), but the second is now or the fact's last date .
i have:
count([Time].[Date].&[2007 -08-31T00: 00:00]:[Ti me].[Date] .&[2009-03 -18T00:00: 00])
i want :
count([Time].[Date].&[2007 -08-31T00: 00:00]: now) - [b]error[/b]
count([Time].[Date].&[2007 -08-31T00: 00:00]: Tail(NonEmpty([Time].[Year - Month - Date].Members,[Measures].[ qty] )).item(0).membervalue ) -[b] error[/b]
Do you know how I can do it?
thanks
i have:
count([Time].[Date].&[2007
i want :
count([Time].[Date].&[2007
count([Time].[Date].&[2007
Do you know how I can do it?
thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
select
closingperiod ([Date].[Calendar].[Date])
[Measures].[Internet Sales Amount] on Columns
from [Adventure Works]
A more robust solution is to generate a set filtered on a measure that you know only has values for current dates, and then take the last member of that:
select
tail(filter([Date].[Calend
[Measures].[Internet Sales Amount] on columns
from [Adventure Works]
A similar approach is to define an attribute flag in your time dimension that will indicate the current day. However, this is only practical if you're updating the cube every day.