Quantcast
Channel: Pentaho Community Forums
Viewing all articles
Browse latest Browse all 16689

Using LinRegSlope() function

$
0
0
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.

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]

Result in that case is 'NaN'. Does anybody use this function on Mondrian?

Viewing all articles
Browse latest Browse all 16689

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>