Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
私のデータ例:
id value_a 1 1.0 2 2.0 3 3.0 4 4.0
私が欲しいのは
id / value_a / recent_n_avg 1 1.0 0.33 2 2.0 1.00 3 3.0 2.00 4 4.0 3.00
最近のn_avgは、最近のn行の平均です(例ではn = 3)。
MDXを使用してこの問題を解決する方法。
ありがとう。
1つのディメンションに対してのみ実行する必要があり、このディメンションがフラットである場合は、新しい計算メンバーに対して次の式を記述できます。
SUM({[Dimension].CurrentMember.Lag(2):[Dimension].CurrentMember}, [Measures].[Your measure])/3
また、ディメンションのメンバー「すべて」とメンバー#1、2について覚えておく必要があります。