These functions calculate the growth/growth rate of a measure from the previous period
Syntax
Growth( <Measure> )
Parameters
<Measure> : A Measure or Custom Measure.
Descripion
Calculates growth over time. Assuming the query is at a monthly level, it is the same as the following formula: ([Measure] - PastMonth([Measure])) / PastMonth([Measure]).
Syntax
GrowthRate( <Measure> )
Parameters
<Measure> : A Measure or Custom Measure.
Descripion
Calculates growth rate over time. Assuming the query is at a monthly level, it is the same as the following formula: [Measure] / PastMonth([Measure]).
Examples
Consider the following raw data:
| Date | Store | Sales |
| November 2007 | Store A | 10 |
| November 2007 | Store B | 20 |
| December 2007 | Store A | 30 |
| December 2007 | Store B | 40 |
| January 2008 | Store A | 50 |
| January 2008 | Store B | 60 |
| February 2008 | Store A | 70 |
| February 2008 | Store B | 80 |
Growth Over Previous Month (or Year|Quarter|Day)
Let's calculate growth and growth rate from the previous month.
| [Date Month] | [Sum Sales] | PastMonth( [Sum Sales] ) |
| November 2007 | 30 {10+20} | |
| December 2007 | 70 {30+40} | 30 {previous month is November 2007} |
| January 2008 | 110 {50+60} | 70 {previous month is December 2007} |
| February 2008 | 150 {70+80} | 110 {previous month is January 2008} |
To calculate growth rate using the GrowthRate() function:
| [Month] | GrowthRate( [Sum Sales] ) |
| November 2007 | |
| December 2007 | 2.33 {70/30} |
| January 2008 | 1.57 {110/70} |
| February 2008 | 1.36 {150/110} |
To calculate growth using the Growth() function:
| [Month] | Growth( [Sum Sales] ) |
| November 2007 | |
| December 2007 | 1.33 {(70-30)/30} |
| January 2008 | 0.57 {(110-70)/110} |
| February 2008 | 0.36 {(150-110)/110} |
Growth From Parallel Quarter (or Year|Month)
Let's calculate the growth and growth rate from the same month, previous Quarter.
| [Date Month] | [Sum Sales] | PastQuarter( [Sum Sales] ) |
| November 2007 | 30 {10+20} | {August 2007 does not exist} |
| December 2007 | 70 {30+40} | {September 2007 does not exist} |
| January 2008 | 110 {50+60} | {October 2007 does not exist} |
| February 2008 | 150 {70+80} | 30 {same month previous quarter is November 2008} |
To calculate growth rate using the PastQuarter() (or similarly, the PastYear()) function:
| [Month] | [Sum Sales] / PastQuarter( [Sum Sales] ) |
| November 2007 | |
| December 2007 | |
| January 2008 | |
| February 2008 | 5 {150/30} |
To calculate growth using the PastQuarter (or similarly, the PastYear()) function:
| [Month] | ([Sum Sales] - PastQuarter([Sum Sales])) / PastQuarter([Sum Sales]) |
| November 2007 | |
| December 2007 | |
| January 2008 | |
| February 2008 | 4 {(150-30)/30} |
See Also