Hello!
I have a task to calculate trend based on our cube data. It's seems that there is a special MDX function for that task - LinRegSlope(). But I've got a strange result, even on SteelWheelsSales cube.
My MDX is below.
Result in that case is 'NaN'. Does anybody use this function on Mondrian?
I have a task to calculate trend based on our cube data. It's seems that there is a special MDX function for that task - LinRegSlope(). But I've got a strange result, even on SteelWheelsSales cube.
My MDX is below.
Code:
with set Years4 as {LastPeriods(4, [Time].[All Years])}
member [Measures].[R] as LinRegSlope([Years4], [Measures].[Quantity])
select {[Measures].[R]} ON COLUMNS,
Hierarchize(Union({[Time].[All Years]}, [Time].[All Years].Children)) ON ROWS
from [SteelWheelsSales]