I'm fairly new to MDX queries, and I'm having trouble understanding how I might compute a period over period measurement. For example say I have a metric like revenue, and I'm breaking that revenue out over time say on a Month to Month basis. How would I calculate the change from Month to Month of that revenue as a percent? Now let's say I want to calculate that generically over any period, quarter to quarter, year to year, month to month, or even compare it with identical periods from prior years. 2011 Q1 vs 2012 Q1, 2011 Q2 vs 2012 Q2, etc.
Schema definition:
<Dimension type="TimeDimension" highCardinality="false" name="Time">
<Hierarchy name="yearQuarterMonth" caption="Year/Quarter/Month" hasAll="true" primaryKey="id">
<Table name="Time"/>
<Level name="Year" column="year" type="Numeric" uniqueMembers="true" levelType="TimeYears" hideMemberIf="Never"/>
<Level name="Quarter" column="quarter" type="Numeric" uniqueMembers="false" levelType="TimeQuarters" hideMemberIf="Never"/>
<Level name="Month" column="month" type="Numeric" ordinalColumn="month" uniqueMembers="false" levelType="TimeMonths" hideMemberIf="Never"/>
<Level name="Day" column="day" type="Numeric" uniqueMembers="false" levelType="TimeDays" hideMemberIf="Never"/>
</Hierarchy>
<Hierarchy name="fiscalYearQuarterMonth" caption="Fiscal Year/Quarter/Month" hasAll="true" primaryKey="id">
<Table name="Time"/>
<Level name="Fiscal Year" column="fiscal_year" type="Numeric" uniqueMembers="true" levelType="TimeYears" hideMemberIf="Never"/>
<Level name="Quarter" column="quarter" type="Numeric" uniqueMembers="false" levelType="TimeQuarters" hideMemberIf="Never"/>
<Level name="Month" column="month" type="Numeric" ordinalColumn="month" uniqueMembers="false" levelType="TimeMonths" hideMemberIf="Never"/>
<Level name="Day" column="day" type="Numeric" uniqueMembers="false" levelType="TimeDays" hideMemberIf="Never"/>
</Hierarchy>
<Hierarchy name="yearMonth" caption="Year/Month" hasAll="true" primaryKey="id">
<Table name="Time"/>
<Level name="Year" column="year" type="Numeric" uniqueMembers="true" levelType="TimeYears" hideMemberIf="Never"/>
<Level name="Month" column="month" type="Numeric" ordinalColumn="month" uniqueMembers="false" levelType="TimeMonths" hideMemberIf="Never"/>
<Level name="Day" column="day" type="Numeric" uniqueMembers="false" levelType="TimeDays" hideMemberIf="Never"/>
</Hierarchy>
<Hierarchy name="fiscalYearMonth" caption="Fiscal Year/Month" hasAll="true" primaryKey="id">
<Table name="Time"/>
<Level name="Fiscal Year" column="fiscal_year" type="Numeric" uniqueMembers="true" levelType="TimeYears" hideMemberIf="Never"/>
<Level name="Month" column="month" type="Numeric" ordinalColumn="month" uniqueMembers="false" levelType="TimeMonths" hideMemberIf="Never"/>
<Level name="Day" column="day" type="Numeric" uniqueMembers="false" levelType="TimeDays" hideMemberIf="Never"/>
</Hierarchy>
</Dimension>