Analyst
Analyst

Reputation: 11

XBRL formulae_cover and complement variations

I would like to understand how "complement", "cover" and "bindAsSequence" work in XBRL formulae.

Do I understand correctly, that:

  1. If a factVariable/generalVariable has "bindAsSequence"=true => a) means that elements inside a factVariable will be tested as a group b) means that generalVariable applies to all factVariables inside the ValueAssertion

  2. If a factVariable/generalVariable has "bindAsSequence"=false => a) means that elements inside a factVariable will NOT be tested as a group b) means that generalVariable DOES NOT apply to all factVariables inside the ValueAssertion

  3. If a conceptName/explicitDimension/typedDimension has "cover"=true and "complement"=true means a conceptName/explicitDimension/typedDimension will be EXCLUDED from the formula test

  4. If a conceptName/explicitDimension/typedDimension has "cover"=true and "complement"=false means a conceptName/explicitDimension/typedDimension will be tested in the formula

  5. If a conceptName/explicitDimension/typedDimension has "cover"=false and "complement"=true means a conceptName/explicitDimension/typedDimension - I don't know, please, help me to understand

  6. If a conceptName/explicitDimension/typedDimension has "cover"=false and "complement"=false means a conceptName/explicitDimension/typedDimension - I don't know, please, help me to understand

Example for #5

"cover"=false and "complement"=true

Example for #6

"cover"=false and "complement"=false

Upvotes: 1

Views: 66

Answers (1)

Ghislain Fourny
Ghislain Fourny

Reputation: 7279

The general idea is that the XBRL formula machinery groups facts, and then evaluates the formula or assertion within each group.

Facts land into the same group if they have the same aspects (concepts, periods, entities, units, dimensions, etc) except the aspects that are used ("covered") in the filters. For example, for a very simple value assertion that checks that a concept is the sum of some other concepts, the concept aspect is covered and facts are grouped based on all aspects other than the concept.

Within a group, each variable is bound in turn to each fact that passes its filter, i.e., each fact triggers a different evaluation of the formula or assertion. If there are multiple variables with multiple facts passing their filters (all within the same group), then all possible binding combinations are taken.

By default, bindAsSequence is false, cover is true and complement is false. The behavior described above thus corresponds to these default values.

The effect of setting bindAsSequence to true for a filter is that, if there are several facts within the same group that pass the filter, then the variable is bound only once to the entire sequence, leading to less evaluations.

The effect of setting cover for a filter to false is that any use of an aspect in this filter has no effect on the grouping, i.e., facts with different values for that aspect will remain in different groups.

The effect of setting complement for a filter to true is that the filter is inverted: facts that would have passed the filter do not pass the inverted filter, and facts that would not have passed the filter do pass it.

Upvotes: 0

Related Questions