I have been trying to get the ValueR column of the following query through the MDX but instead getting ValueW as output of the MDX
select
exp(Log(sum(MTMROR)+ 1 ))-1 as ValueW,
exp(sum(Log(MTMROR + 1)))-1 as ValueR
from
Temp_Performance
where Rundate in ('2015-03-01','2015-03-02')
MDX written for the above query is
With
Member [Measures].[LogValuePre]
as ([Measures].[MTMROR] + 1)
Member [Measures].[LogValuePre1]
as VBA![LOG]([Measures].[LogValuePre])
Member [Measures].[LogValue]
as VBA![Exp](Sum([Measures].[LogValuePre1]))-1
select
{
[Measures].[LogValuePre],
[Measures].[LogValuePre1],
[Measures].[LogValue]
} on 0,
{
[Dim Company Fund].[Company Fund Id].&[1274]
//* {[Dim Time].[Date].&[2015-03-01T00:00:00] : [Dim Time].[Date].&[2015-03-//02T00:00:00]}
} on 1
from
(
select {[Dim Time].[Date].&[2015-03-01T00:00:00] : [Dim Time].[Date].&[2015-03-02T00:00:00]} on 0
from [DSV_Cube]
)
[MTMROR] measure has the aggregate function Sum. What i can get from this behavior is MDX is first aggregating the result and default aggregation function is Sum. When i try to see the value with more granular data by having the date dimensions on the row (un-commenting the date dimension) i get the correct log and exp log values. Its showing the correct value as date dimension is most granular level in the fact table. While trying to get the data at less granular level(Fund level), getting the sum function applied automatically.
If i set AggregateFunction to none in the cube structure, i get null as the output.
How could i apply the log function before the sum function in the [MTMROR] measure?
Thanks
MTMROR
is built is related to which dimensions out of the above and how? – SouravA