February 3, 2009 at 10:53 am
I have a format string problem.
When my Prior Year calculated measure is displayed, the format string is not applied. the result I get in Excel 2007 are:
Total Cost - 12313.85
Quantity - 13,213
Quantity is returned using the "#,#" format and Total Cost is returned using the "Currency" format.
Any Ideas as to why this is happening or how to nail down the format?
Thanks.
CREATE MEMBER CURRENTCUBE.[Time Calculations].[Prior Year] AS Null,
FORMAT_STRING = "#,#",
VISIBLE = 1;
(...some other mdx...)
//Prior Year - Fiscal
if left(membertostr([Dates].[calendar Fiscal].CurrentMember.parent),25) = "[Dates].[Calendar Fiscal]"
then ([Dates].[Calendar Fiscal].members,[Time Calculations].[Prior Year])=
(ParallelPeriod([Dates].[Calendar Fiscal].[Year], 1, [Dates].[Calendar Fiscal].currentmember) , [Time Calculations].[Current Period])
end if;
//Prior Year - Domestic
if left(membertostr([Dates].[calendar Domestic Model].CurrentMember.parent),33) = "[Dates].[Calendar Domestic Model]"
then ([Dates].[Calendar Domestic Model].[Year].members,[Time Calculations].[Prior Year])=
(ParallelPeriod([Dates].[Calendar Domestic Model].[year], 1, [Dates].[Calendar Domestic Model].currentmember) ,[Time Calculations].[Current Period])
end if;
if left(membertostr([Dates].[calendar Domestic Model].CurrentMember.parent),33) = "[Dates].[Calendar Domestic Model]"
then ([Dates].[Calendar Domestic Model].[Month].members,[Time Calculations].[Prior Year])=
(ParallelPeriod([Dates].[Calendar Domestic Model].[year], 1, [Dates].[Calendar Domestic Model].currentmember) ,[Time Calculations].[Current Period])
end if;
if left(membertostr([Dates].[calendar Domestic Model].CurrentMember.parent),33) = "[Dates].[Calendar Domestic Model]"
then ([Dates].[Calendar Domestic Model].[Day].members,[Time Calculations].[Prior Year])=
(ParallelPeriod([Dates].[Calendar Domestic Model].[year], 1, [Dates].[Calendar Domestic Model].currentmember) ,[Time Calculations].[Current Period])
end if;
February 4, 2009 at 7:07 am
I've had much better success with SSAS and Excel2007 formatting issues explicitly spelling out the format string that I want. For example instead of "Currency" I stipulate "$#,###.##".
Give that a shot and if that doesn't solve your problem I'll tinker with it a little more.
Rick Todd
February 5, 2009 at 10:29 am
You missed my point.
Formating is not applied to my calculated measures. I'm wondering if it has something to do with the calc measure being set to "null" when it is created and later it is assigned it value.
February 9, 2009 at 8:22 am
Anyone have any ideas on this?
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply