- This topic has 2 replies, 2 voices, and was last updated 1 year, 3 months ago by .
Viewing 2 reply threads
Viewing 2 reply threads
- You must be logged in to reply to this topic.
Home › Forums › The XBRL API › Query for multiple dimensions
Hi,
Here’s what I’m querying for:
*entity.code 0001035002
*fact.ultimus TRUE
*fact.has-dimensions TRUE
*fact.is-extended TRUE
*dimension.local-name StatementBusinessSegmentsAxis
*member.local-name RenewableDieselMember
*concept.local-name RevenueFromContractWithCustomerIncludingAssessedTax
*dimensions.count 2
*period.year 2024
*period.calendar-period 2Q
I get four results from this query, each with different fact.value values:
*630000000
*1184000000
*540000000
*14000000
The other dimension for each of these results is identical:
*dimension.local-name ConsolidationItemsAxis
*member.local-name OperatingSegmentsMember
Said differently, each of these four entries has the same dimension-pair values.
In reality, these four values are different in the following way:
* 630000000 – this is the intersegment revenue for Valero’s Renewable Diesel segment
* 1184000000 – this is the total revenue for Valero’s Renewable Diesel segment
* 540000000 – this is the revenue from external customers for just “renewable diesel” within Valero’s Renewable Diesel segment
* 14000000 – this is the revenue from external customers for just “renewable naphtha” within Valero’s Renewable Diesel segment
What we’re missing here is 554000000, which is the reported revenue from external customers for the entirety of Valero’s Renewable Diesel segment (the above “renewable diesel” plus “renewable naphtha” values).
Short version of my question – what can I do in my query to only pull in the 1184000000?
They seem to all have the same values for any of the fields I can query against, and I’m struggling to see how I can separate these facts from each other via the query.
Thanks in advance for any help you can offer.
Hi Jeff – thanks for writing. Try this query (dropping the dimensions.count filter and including dimension-pair as a field in the return):
https://api.xbrl.us/api/v1/fact/search?entity.code=0001035002&period.fiscal-year=2024&period.fiscal-period=2Q&concept.local-name=RevenueFromContractWithCustomerIncludingAssessedTax&fact.ultimus=true&fields=concept.local-name,dimension-pair,dimensions.count,entity.name,fact.value,period.fiscal-period,period.fiscal-year&dimension.local-name=StatementBusinessSegmentsAxis&member.local-name=RenewableDieselMember
There are 5 values, including the totaled RenewableDieselMember as a business segment. Dimensionalized values are the pieces of a total; the total is not included in the dimension.
Apply that concept to the value you’re looking for and you can see it’s on the ConsolidationItemsAxis as an OperatingSegmentsMember in the query. Update to this query and you’ll see the value as a member on the StatementBusinessSegmentsAxis:
https://api.xbrl.us/api/v1/fact/search?entity.code=0001035002&period.fiscal-year=2024&period.fiscal-period=2Q&concept.local-name=RevenueFromContractWithCustomerIncludingAssessedTax&fact.ultimus=true&fields=concept.local-name,dimension-pair,dimensions.count,entity.name,fact.value,period.fiscal-period,period.fiscal-year&dimension.local-name=ConsolidationItemsAxis&member.local-name=OperatingSegmentsMember
I hope this helps.
David,
That’s fantastic. You’re the best.
And that was my confusion, about the totals not showing up in the dimension. That definitely helps me organize this idea more clearly in my head.
Thanks for all that you do around here. You’re a huge help.
All the best,
Jeff
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.