How to derive mdx in pentaho. I tried with order,rank, and sum. but it takes too much time.

please let me know the best approach to calculate running sum..