NumPerInGen

Gets the number of periods in the generation for the current period being processed. This function can be used in Dynamic SUB functions.

Syntax

HS.Period.NumPerInGen

Return Value

One value for the number of periods of the view.

Example

HS.Dynamic "A#MarginPct=A#GrossMargin/HS.Period.NumPerInGen"

For example, if the current period is April, and April is in the fourth generation in the calendar file (monthly generation), the number of periods for the monthly generation is 12. If the current period is Q2, which is in the third generation of the calendar file (quarterly generation), the number of periods is 4.

Monthly generation (4th generation):

January, February, March, April, May, June, July, August, September, October, November, December

System returns 12 for the number of periods in this generation.

Quarterly generation (3rd generation):

Q1, Q2, Q3, Q4

System returns 4 for the number of periods in this generation.

Half-yearly generation (2nd generation):

HY1, HY2

System returns 2 for the number of periods in this generation.

Yearly generation (first generation):

Year

System returns 1 for the number of periods in this generation.