Log in  ::  Register  ::  Not logged in

 Recent PostsRecent Posts Popular TopicsPopular Topics
 Home Search Members Calendar Who's On

 mdx calculated measure issue Rate Topic Display Mode Topic Options
Author
 Message
 Posted Thursday, July 11, 2013 7:02 PM
 Valued Member Group: General Forum Members Last Login: Wednesday, July 31, 2013 3:45 AM Points: 74, Visits: 226
 Hi everyone,I have wriiten 2 calculated measures for my cube..my cal measures are:create member [Measures].[A]as iif([measures].[sales]=0,NULL,[measures].[Latencydays]/[measures].[sales]),visible=1create member [Measures].as iif([measures].[Responses]=0,NULL,[measures].[Latencydays]/[measures].[Responses]),visible=1but results are different from database to cube..those are...[b]below result is from DB:avgsaleslatency avgResplatency latency days sales responsesNull Null 0 Null Null15 Null 15 1 NullNull 23 23 Null 1cube resultlatencydays sales responses avgsaleslatency avgresplatency 38 1 1 38 38but as aggregate is sum for latencydays it showing the results as below:But Here what the expected result is :avgsaleslatency avgresponseLatency15 23can anybody correct me, if my measure are wrong or if there is any other way to fix it..Thanks in advance,Niharika
Post #1472835
 Posted Friday, July 12, 2013 12:52 AM
 SSC Veteran Group: General Forum Members Last Login: Today @ 2:44 AM Points: 294, Visits: 577
 Hi,It's a little hard to tell without knowing your data structure but it seems as if your measure called "LatencyDays" needs to be split via a dimension. It looks as if what your cube is reporting is correct in that it's summing up ALL of your latency days (15+23=38) without the context of a dimensional member to slice it by.So, say you had a dimension that was joined to whatever measure group your LatencyDays measure is in, let's call it LatencyType and assume it has one attribute called LatencyType. Then your calculated measure would look like this:`MEMBER [Measures].[SalesLatency]ASSUM([LatencyType].[LatencyType].&[Sales], [Measures].[LatencyDays])`Hope this helps I'm on LinkedIn
Post #1472872

 Permissions