Home Forums The XBRL API Query for multiple dimensions

Viewing 2 reply threads
  • Author
    Posts
    • #219906
      Jeff Krimmel
      Participant

      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.

    • #219907
      David Tauriello
      Keymaster

      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.

    • #219951
      Jeff Krimmel
      Participant

      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

Viewing 2 reply threads
  • You must be logged in to reply to this topic.

Upcoming XBRL US Events

FERC: How Regulators Use Technology to Improve Efficiency
Wednesday, September 11, 2024

Domain Steering Committee Meeting
Tuesday, September 17, 2024

Communications & Services Steering Committee Meeting
Tuesday, September 17, 2024

Center for Data Quality Committee Meeting
Wednesday, September 25, 2024

Digital Reporting for Measurable Results: Climate, Corporate, Government
Thursday, November 14, 2024