May 12, 2009 at 8:32 am
Hi all,
I have a report that can be run between any two dates. For example lets say between May 1st and May 31st. I have a Days Remaining field in the report, which is the number if days between the day the report was run (lets say May 12th) and the last day of the reporting period (May 31st). Days Remaining will be 19 in this case. Is there a way to achieve this through a Calculated Member? If not, what is the best way to do this?
My report is in excel. Any help will be greatly appreciated. Thanks in advance.
R
May 12, 2009 at 9:06 am
I think I found the solution...
datediff(
"d",
Now(),
[Transaction Date].[Day Of Month].CurrentMember.MemberValue
)
May 12, 2009 at 10:15 am
Oops... No luck... Although the formula works, I am unable to find the find the last date in the current reporting period. Can anybody help?
May 26, 2009 at 9:43 am
hi
i think month last is fixed, u have to find on current date and subtract from the last date.
then u can try
declare @today as int
set @today = datepart(dd,getdate())
this way u can fine todays date and simply subtract if from last day of month and u get the remaining days.
--hope so it working
with regards
Pubbs
May 26, 2009 at 9:55 am
you might be able to make use of the LastChild MDX function to find the last member in the parent, so for e.g.[Time].CUrrentMember.Parent.LastChild should get you the last child in the same reporting period as the current date.
Steve.
Viewing 5 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply