I have a cube that I have to calculate a 100 Weight for each Measure. Currently I have created Calculated Members to the tune of what you see below:
CREATE MEMBER CURRENTCUBE.[MEASURES].[AccrualCostCWT]
AS (IIF(([Measures].[Accrual Cost]/[Measures].[Lbs]) = 0, 0,([Measures].[Accrual Cost]/[Measures].[Lbs])*100)),
FORMAT_STRING = "#,#.00",
NON_EMPTY_BEHAVIOR = { [Lbs] },
VISIBLE = 1;
CREATE MEMBER CURRENTCUBE.[MEASURES].[BrokerCostCWT]
AS (IIF(([Measures].[Broker Cost]/[Measures].[Lbs]) = 0, 0, ([Measures].[Broker Cost]/[Measures].[Lbs])*100)),
FORMAT_STRING = "#,#.00",
NON_EMPTY_BEHAVIOR = { [Lbs] },
VISIBLE = 1;
What I would like to do is create an MDX Statement that will calculate the 100 Weight (CWT) for each measure and post it next to the measure. I am sure that there is a way to do this but I am not good enough at MDX to determine what I need to do.
This is running on SQL Server 2005 service pack 2 with the latest critical updates.
Sorry, but I don't understand the "post it next to the measure" part? You just want to cells next to each other in the cell set returned by a query?
Thanks,
Bryan
Thanks for wanting clarification. Here is what I am looking for.
I have a measure with a dollar amount such as accrualCost, brokerCost, etc. (20 Columns like this)
I also have a measure called LBS, I need a way to do the CWT without creating a number of Members. If I could just have one member to work this it would be great.
I would like to see it like either of the following ways.
Let me know if you need further details.
Thanks,
Scott
|||I think I'm starting to see where you're going with this. Let me ask, where is the Amount measure coming from? When you say "Amount" are you actually referring the value of whatever measure you are referencing?
B.
No comments:
Post a Comment