The UsageQuantity in the Cost Export for Azure Functions represents the amount of the resource consumed during the billing period. For Functions billing lines, this typically refers to the total number of executions or the amount of execution time used, depending on the specific metric being measured.
Regarding your second question, UsageQuantity is not measured in the same units across all tiers of Functions usage (Premium, Consumption, and Flex Consumption). Each tier may have different metrics and units of measurement. For example, in the Consumption plan, it is often measured in GB-seconds, while in other plans, it may vary based on the specific billing model used.
As for the ResourceRate, it can change for the same service due to various factors, including different pricing models, discounts applied, or regional pricing variations. This means that even if the UsageQuantity is the same, the ResourceRate can differ based on these factors, leading to different PreTaxCosts for the same service under different conditions.
In your example, the differences in UsageQuantity and ResourceRate can lead to the same PreTaxCost despite varying UsageQuantities, as the ResourceRate might be adjusted based on the specific conditions of each line item, such as location or pricing agreements.
References: