Convert Cost Management data to FOCUS Convert existing Cost Management actual and amortized datasets to FOCUS.

On this page

This document provides guidance for converting Cost Management actual and amortized datasets to the FinOps Open Cost and Usage Specification (FOCUS). To learn more about FOCUS, refer to the FOCUS overview.


āž”ļø How to convert Cost Management data to FOCUS

In order to convert cost and usage data to FOCUS, you will need both the actual and amortized cost datasets:

  1. Keep all rows from the amortized cost data.
  2. Filter the actual cost data to only include rows where ChargeType == ā€œPurchaseā€ or ā€œRefundā€ and PricingModel == ā€œReservationā€ or ā€œSavingsPlanā€.

Apply the following logic to all of the rows:

FOCUS column Cost Management column Transform
BilledCost CostInBillingCurrency If ChargeType == ā€œUsageā€ and PricingModel == ā€œReservationā€ or ā€œSavingsPlanā€, then 0; otherwise, use CostInBillingCurrency
BillingAccountId EA: BillingAccountId
MCA: BillingProfileId
None
BillingAccountName EA: BillingAccountName
MCA: BillingProfileName
None
BillingCurrency EA: BillingCurrencyCode
MCA: BillingCurrency
None
BillingPeriodEnd BillingPeriodEndDate Add 1 day for the exclusive end date
BillingPeriodStart BillingPeriodStartDate None
ChargeCategory ChargeType If ā€œUsageā€, ā€œPurchaseā€, ā€œCreditā€, or ā€œTaxā€, same value; if ā€œUnusedReservationā€ or ā€œUnusedSavingsPlanā€, then Usage; if ā€œRefundā€, ā€œPurchaseā€; otherwise, Adjustment
ChargeClass ChargeType If ā€œRefundā€, then use Correction
ChargeDescription ProductName None
ChargeFrequency Frequency If ā€œOneTimeā€, One-Time; if ā€œRecurringā€, Recurring; if ā€œUsageBasedā€, Usage-Based; otherwise, Other
ChargePeriodEnd Date Add 1 day for the exclusive end date
ChargePeriodStart Date None
CommitmentDiscountCategory BenefitId If BenefitId contains ā€œ/microsoft.capacity/ā€ (case-insensitive), Usage; if contains ā€œ/microsoft.billingbenefits/ā€, use Spend; otherwise, null
CommitmentDiscountId BenefitId None
CommitmentDiscountName BenefitName None
CommitmentDiscountStatus ChargeType If ā€œUnusedReservationā€ or ā€œUnusedSavingsPlanā€, then Unused; else if PricingModel == ā€œReservationā€ or ā€œSavingsPlanā€, then Used; otherwise, null
CommitmentDiscountType BenefitId If BenefitId contains ā€œ/microsoft.capacity/ā€ (case-insensitive), Reservation; if contains ā€œ/microsoft.billingbenefits/ā€, Savings Plan; otherwise, null
ConsumedQuantity Quantity If ChargeType == ā€œUsageā€, then Quantity; otherwise, null
ConsumedUnit UnitOfMeasure If ChargeType == ā€œUsageā€, then map using Pricing units data file; otherwise, null
ContractedCost UnitPrice * Quantity / focus:x_PricingBlockSize Note that x_PricingBlockSize requires a mapping. See column notes for details.
ContractedUnitPrice UnitPrice None
EffectiveCost CostInBillingCurrency If ChargeType == ā€œPurchaseā€ or ā€œRefundā€ and PricingModel == ā€œReservationā€ or ā€œSavingsPlanā€, then 0; otherwise, use CostInBillingCurrency
InvoiceIssuerName PartnerName If PartnerName is empty, use Microsoft
ListCost EA: Not available
MCA: PaygCostInBillingCurrency
None
ListUnitPrice EA: PayGPrice
MCA: PayGPrice * ExchangeRate
None
PricingCategory PricingModel If ā€œOnDemandā€, then Standard; if ā€œSpotā€, then Dynamic; if ā€œReservationā€ or ā€œSavings Planā€, then Committed; otherwise, null
PricingQuantity Quantity / focus:x_PricingBlockSize Note that x_PricingBlockSize requires a mapping. See column notes for details.
PricingUnit DistinctUnits (lookup) Map UnitOfMeasure to DistinctUnits using Pricing units data file
ProviderName Microsoft None
PublisherName PublisherName None
RegionId focus:RegionName Lowercase and remove spaces
RegionName ResourceLocation Map ResourceLocation (OriginalValue) to RegionName using Regions data file2
ResourceId ResourceId None
ResourceName EA: ResourceName
MCA: last(split(ResourceId, ā€œ/ā€))
Azure resource names include multiple levels (e.g., ā€œSqlServerName/SqlDbNameā€), which requires more processing. This is a simplified approach to only use the last, most-specific segment.
ResourceType SingularDisplayName (lookup) Map ResourceType to SingularDisplayName using Resource types data file
ServiceCategory ServiceCategory (lookup) Map ConsumedService and ResourceType to SerivceCategory using Services data file
ServiceName ServiceName (lookup) Map ConsumedService and ResourceType to SerivceName using Services data file
SkuId EA: Not available
MCA: ProductId
None
SkuPriceId Not available None
SubAccountId SubscriptionId None
SubAccountName SubscriptionName None
Tags Tags Wrap in { and } if needed

1. Quantity in Cost Management is the consumed (usage) quantity.

2. While RegionName is a direct mapping of ResourceLocation, Cost Management and FinOps toolkit reports do additional data cleansing to ensure consistency in values based on the Regions data file.


šŸ™‹ā€ā™€ļø Feedback about FOCUS columns

If you have feedback about our mappings or about our full FOCUS support plans, please start a thread in discussions. If you believe youā€™ve found a bug, please create an issue.

If you have feedback about FOCUS, please create an issue in the FOCUS repository. We also encourage you to consider contributing to the FOCUS project. The project is looking for more practitioners to help bring their experience to help guide efforts and make this the most useful spec it can be. To learn more about FOCUS or to contribute to the project, visit focus.finops.org.


šŸ§ See also



  • šŸ¦ FinOps hubs ā€“ Open, extensible, and scalable cost reporting.
  • šŸ“Š Power BI reports ā€“ Accelerate your reporting with Power BI starter kits.
  • šŸ–„ļø PowerShell module ā€“ Automate and manage FinOps solutions and capabilities.
  • šŸŒ Open data ā€“ Data available for anyone to access, use, and share without restriction.



This site uses Just the Docs, a documentation theme for Jekyll.