Home › Forums › The XBRL API › Repeating facts from different documents
- This topic has 4 replies, 2 voices, and was last updated 2 years, 6 months ago by David Tauriello.
-
AuthorPosts
-
-
Monday, May 30, 2022 at 3:45 PM #201030Timur MirzaevParticipant
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")
-
Tuesday, May 31, 2022 at 5:18 AM #201041Timur MirzaevParticipant
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). -
Tuesday, May 31, 2022 at 11:58 AM #201056David TaurielloKeymaster
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.
-
Wednesday, June 1, 2022 at 12:10 PM #201080Timur MirzaevParticipant
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-
Wednesday, June 1, 2022 at 9:42 PM #201099David TaurielloKeymaster
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.
-
-
-
AuthorPosts
- You must be logged in to reply to this topic.
Search Forums
Recent Topics
Recent Replies
-
Spreadsheet Commands: Query Worksheet and Query Workbook Query Workbook 1 month, 1 week ago
-
Query for multiple dimensions 3 months, 1 week ago
-
Query for multiple dimensions 3 months, 2 weeks ago
-
Showdata function 6 months ago
-
Showdata function 6 months ago
Documentation & Discussion
- Get started with Google Sheets OR
- Get started with Microsoft Excel OR
- Get access to as-filed data from us for other tools or your own app
- XBRL API Interactive Documentation
- Ten Tips & Techniques
- The XBRL API
- XBRL Data Community
- 2024 US GAAP Taxonomy Viewer
- Live support - Monday, 3:30 - 4:30 PM ET
Who's using this free data?
API Use 2024 || API Use 2023 || API Use 2022 || API Use 2021 || API Use 2020 || API Use 2019 || API Use 2018
Join XBRL US
- Individual Options - Basic, Power User & Sole Practitioner
- For Your Team - Startup, Non-Profit, Academic & Corporate options
- Member Benefits Comparison Table
Using the XBRL API with the Public Filings Database
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.
To use the XBRL API outside of Google Sheets, your account needs to be provisioned for OAuth2 access.