- This topic has 4 replies, 2 voices, and was last updated 2 years, 11 months ago by .
Viewing 3 reply threads
Viewing 3 reply threads
- You must be logged in to reply to this topic.
Home › Forums › The XBRL API › Repeating facts from different documents
Some facts are repeating when extracting several documents in a single call. I can see the reason (tag/concept change), but don’t know the solution. Is there any way to remove those duplicating values, but keep the two tags/concepts in a query?
Here is my API call with row 2 and 3 being similar:
XBRL.showData(""&fact&"&entity.cik="&CIK&fiscal&"3Q&concept.local-name="&"IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest,IncomeLossFromContinuingOperationsBeforeIncomeTaxesMinorityInterestAndIncomeLossFromEquityMethodInvestments"&","&Legend!C6&"&fact.has-dimensions=false&fact.ultimus=true&report.document-index=1,2,3,4&fields=report.period-end,period.fiscal-year.sort(DESC),concept.local-name,fact.numerical-value,period.fiscal-period.sort(DESC)","","","1")
Just a little update: Missed part of my query that refers to a named range “CIK”.
In this very case it should stand for “0000789019” (for MSFT).
Hi Timur – thanks for writing. I’m not sure what additional parameter you’re using from C6 on the Legend worksheet (?). If I remove that and update ‘fiscal’ to be the parameter ‘period.fiscal-period’ I don’t see any duplication:
https://api.xbrl.us/api/v1/fact/search?entity.cik=0000789019&period.fiscal-period=3Q&concept.local-name=IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest,IncomeLossFromContinuingOperationsBeforeIncomeTaxesMinorityInterestAndIncomeLossFromEquityMethodInvestments&fact.has-dimensions=false&fact.ultimus=true&report.document-index=1,2,3,4&fields=report.period-end,period.fiscal-year.sort(DESC),concept.local-name,fact.numerical-value,period.fiscal-period.sort(DESC)
Drop the query in A1, and use =XBRL.showData(A1,””,””,”1″) in A2
Let me know if there’s something else I’m missing.
Hi, David!
Thank you very much for your reply. I forgot to fully correct my query for named ranges, hence the error.
But your correction is exactly what my query should have looked like. I have done exactly what you showed above and I DO get duplicating values – see D4 and D5 of the output (if xbrl.showData is in A2), which is $17,236,000,000 for 3Q of FY’2021.
So my question here is whether it is possible to introduce any parameter that would remove those duplicates (sort of a “unique” function maybe, but on the query level so that the per query limit is not effected that much).
Regards,
Timur
Hi Timur – these are different facts appearing in different reports. Look at the full concept.local-name for rows 4 and 5. Further, if you add report.sec-url
to the fields to be returned, you can browse to the EDGAR entries and confirm the values are different.
IncomeLossFromContinuingOperationsBeforeIncomeTaxesMinorityInterestAndIncomeLossFromEquityMethodInvestments – https://www.sec.gov/Archives/edgar/data/789019/000156459021020891/0001564590-21-020891-index.htm
IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest – https://www.sec.gov/Archives/edgar/data/789019/000156459022015675/0001564590-22-015675-index.htm
When you review the face of the report these fact values do have the same label – https://api.xbrl.us/api/v1/label/search?dts.id=456408,583061&concept.id=27969523,31293140&fields=concept.id,concept.local-name,label.role-short,label.text – it may be that the company’s external reporting team reconsidered the definition it had been using, and decided to transition to a new concept.
The XBRL API does not currently normalize facts with a mechanism as you describe that would evaluate and eliminate facts with duplicated labels like this.
API Use 2024 || API Use 2023 || API Use 2022 || API Use 2021 || API Use 2020 || API Use 2019 || API Use 2018
Unless otherwise agreed to in writing, any and all use of the XBRL API to authenticate and retrieve data from the XBRL US Database of Public Filings implies user consent and agreement with the XBRL US API Agreement. If you are unable to agree to these terms, do not use the XBRL API.