Excel XBRL functions library

From XBRLWiki
Jump to: navigation, search


Starting on release 2.6.12 of Reporting Standard S.L. products suite, XBRLizer and XBRLviewer can export the view of an XBRL report to an Excel sheet as formulas pointing to the information stored into the XBRL Database.

The function that retrieves the data from the database is called XBRLFactFiltered.



Search for a fact on the XBRL Database using parameters that describe different aspects of the fact item.


=XBRLFactFiltered("","","", ...) Up to 20 arguments (filters) are allowed. Normally only 3 or 4 are needed.


Each filter contains a filter prefix and a filter argument. The filter prefix is a 1 to 3 letters token followed by a colon sign.

The Company Filter

Prefix: c:

Argument: The company name, this is the name of the company as stored into the XBRL Database. The XBRL Database contains a table that links a company name with a pair of entity - identifier strings as defined in the XBRL 2.1 specification and used in XBRL reports.

Reporting Standard S.L. software will automatically obtain the company name if it is available in the report and there is a specific element name in the taxonomy where companies will put their company name. Implemented algorithms include the UG-GAAP taxonomy (dei taxonomy) and the IFRS 2010.


The Concept Name filter

Prefix: fn:

Argument: The concept name for which the fact is reported. This is the XML element name as defined in a table that links the element name with the pair prefix and element name in a taxonomy. Users don't need to remember element names from the XBRL Taxonomy as the software allows them to change the assigned element name if this is required.

By default, Reporting Standard S.L. software automatically build element names using an algorithm that considers the taxonomy prefix and the element name. If the taxonomy prefix has already been used by another taxonomy, then a number is added to the taxonomy prefix in order to remove duplicates.

Example: fn:us-gaap_CashAndCashEquivalentsAtCarryingValue

The Time filter

Prefix: t:

Argument: This is always two dates defining a period (even for instant values) separated by a semicolon and followed by a letter that identifies the period type (instant i, duration d)

For Instant periods, the two dates must be equal. For Duration periods the first date is the period starting date and the second date is the period end date. For the special case in XBRL that is the forever period, the starting date is always 0001-01-01 and the end date is 9999-12-31 with period type identifier f.


  • t:2009-01-04;2009-10-10d Duration period
  • t:2010-10-09;2010-10-09i Instant period
  • t:0001-01-01;9999-12-31f Forever period
The Report Filter

Prefix: rp:

Argument: This is the document URL as it is stored into the XBRL Database. All XBRL reports must have an official document URL. The URL can be invented if the regulator does not provides one and it is assigned during the document storage phase.

Example: rp:http://www.sec.gov/Archives/edgar/data/1158449/000115844910000101/aap-20101009.xml

The Dimensions Filter

Prefix: dim:

Argument: This is the dimension name followed by the equal sign and followed by the dimension value. Dimension names and dimension values are always elements defined in XBRL Taxonomies so the same names used in the Concept Name filter applies here.

Example: dim:us-gaap_StatementEquityComponentsAxis=us-gaap_NoncontrollingInterestMember


=XBRLFactFiltered("c:ADVANCE AUTO PARTS INC", "fn:us-gaap_CashAndCashEquivalentsAtCarryingValue", "t:2010-01-02;2010-01-02i", "rp:http://www.sec.gov/Archives/edgar/data/1158449/000115844910000101/aap-20101009.xml")


Main Page