Skip to main content
insightsoftware Documentation insightsoftware Documentation
{%article.title%}
Published:
Was this article helpful?
0 out of 0 found this helpful

By

Use this function to specify the dimension through which calculations are performed.

Normally, when doing a row calculation, your system calculates the values of the first row symbol in all columns and on all pages. Then it moves to the next row calculation, and proceeds in the same way; however, you may want to change the order of calculation so that your system does row calculations in a different sequence — for example, by column. In this case, your system calculates the values of the row symbol in the first column of all pages, and then moves to the next row calculation. Once your system performs all the row calculations for the first column, it performs the first row calculation for the second column, and so on.

Use the By function to calculate along a dimension other than the default. Although you do not always need to use a By statement, you may find calculations are faster when calculating by a different dimension. In addition, some function statements require a By calculation — Lag and BaseValue, for example.

You can use the By function in several ways:

  • to optimize the calculations in a Model. When you specify a dimension with a smaller number of symbols in a By statement, you optimize the processing time of the calculation.
  • with the Allocate function to specify the direction of the allocation
  • to specify the dimension in which a lag or lead is applied
  • in conjunction with the following functions:

Since your system uses parent/child relationships, use priority to specify the calculation order of symbols. For functions that rely on symbols in a certain order (for example, Lag and Lead), you can specify priorities in the Longview database.

For example, if you have 12 months rolling up to four quarters, you may want to calculate cash flows between periods. You will first have to calculate the cash flows between months, and then between quarters.

Syntax:

BY DimName

where:

  • DimName is the dimension in which calculations will occur.

Syntax example:

BY TIMEPER

Published:

By

Use this function to specify the dimension through which calculations are performed.

Normally, when doing a row calculation, your system calculates the values of the first row symbol in all columns and on all pages. Then it moves to the next row calculation, and proceeds in the same way; however, you may want to change the order of calculation so that your system does row calculations in a different sequence — for example, by column. In this case, your system calculates the values of the row symbol in the first column of all pages, and then moves to the next row calculation. Once your system performs all the row calculations for the first column, it performs the first row calculation for the second column, and so on.

Use the By function to calculate along a dimension other than the default. Although you do not always need to use a By statement, you may find calculations are faster when calculating by a different dimension. In addition, some function statements require a By calculation — Lag and BaseValue, for example.

You can use the By function in several ways:

  • to optimize the calculations in a Model. When you specify a dimension with a smaller number of symbols in a By statement, you optimize the processing time of the calculation.
  • with the Allocate function to specify the direction of the allocation
  • to specify the dimension in which a lag or lead is applied
  • in conjunction with the following functions:

Since your system uses parent/child relationships, use priority to specify the calculation order of symbols. For functions that rely on symbols in a certain order (for example, Lag and Lead), you can specify priorities in the Longview database.

For example, if you have 12 months rolling up to four quarters, you may want to calculate cash flows between periods. You will first have to calculate the cash flows between months, and then between quarters.

Syntax:

BY DimName

where:

  • DimName is the dimension in which calculations will occur.

Syntax example:

BY TIMEPER

For an optimal Community experience, Please view on Desktop