A Calculated Risk

A detailed investigation into the complexities and limitations of XBRL Calculations
by: Shawn Rush, CompSci Resources, LLC

Note that only concepts are specified in a calculation. Fact values, contexts (which carry date and dimension information), and presentation links (tables or sections) are not specified when creating the calculation. The calculation applies to a set of facts for a given context if (a) a fact exists for the total concept with the given context and (b) another fact exists for at least one of the operand concepts with the given context. Again, context specifies the dates and dimensions for a given fact value.

Let's take a look at how this applies if we have the following data:


Given the scenario above, the table below shows how the calculation is applied to the data:


With this we must remember that the calculations are applied to facts grouped solely by context and not by financial statement or presentation link. This means that a single calculation can apply to multiple presentation links if those links contain concepts that exist in the calculation. We will discuss some of the issues with this later.

A concept's balance type also plays a significant role in calculations. A concept could have a balance type of debit, credit, or none. This is relevant because the balance type of the total concept determines whether the operands can be added or subtracted.

If this sounds confusing to you, then you're not alone. We'll use the previous calculation to shed some light.


Because "LiabilitiesAndStockholdersEquity" has a balance type of debit and is the total, debit concepts can only be added and credit concepts can only be subtracted. Likewise, if the total were to have a balance type of credit, credit concepts can only be added and debit concepts can only be subtracted. Note that if a total does not have a balance type, then credit concepts and debit concepts can be either added or subtracted. Similarly, if an operand concept has no balance type, it can be either subtracted or added regardless of the balance type of the total.




Previous  Table of Contents | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | pdf   Next