I am trying to calculate a measure which is the difference between a measure (say, profit) today and the nearest preceding quarter.
E.g.: if the quarter months are March, June, September and December, then:
If the current month is May, then the calculatedmeasure = Profit(May)-Profit(March)
If the current month is November, then the calculatedmeasure = Profit(November)-Profit(September)
If the current month is December, then the calculatedmeasure = Profit(December)-Profit(September)
I'm new to MDX and would really like some help on this.
I'm aware of .CurrentMember.PrevMember to get the previous member, but that doesn't help if you don't know how many previous members calls you should use.