Skip to content

Different caculating result from Azure price caculator #4

@rekenliu

Description

@rekenliu

Could you please check the issue reported in this forum thread?
https://social.msdn.microsoft.com/Forums/en-US/aa0cd926-1bfe-40c9-925e-76607e074a6a/azure-usage-scaled-rates-pricing?forum=partnercenterapi
The price calculated by this sample code is different from Azure calculator. The key difference is in :
total = total + ((remainingUsage - LastKey + 1) * LastKeyValue);
when the remaining usage is 1, and Last Key is 0, the real result would be (1-0+1)=2, so the real usage in this command is 2, not 1.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions