Skip to content

Document behavior for negative and missing savings values in cost calculations #1741

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: dev
Choose a base branch
from

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Jul 2, 2025

This PR addresses the need for standardized documentation explaining how negative savings and missing prices are handled in FinOps toolkit cost optimization calculations.

Problem

Users were experiencing confusion when seeing:

  • Negative savings values in Power BI and Azure Data Explorer reports
  • Zero savings when price data was missing
  • Inconsistent interpretation of these values across different reporting tools

Without clear documentation, users often misinterpreted negative values as bugs or assumed zero savings always meant no optimization opportunity existed.

Solution

Created comprehensive documentation explaining savings calculation behavior:

📋 New Documentation: savings-calculations.md

  • Clear definitions: Negative savings occur when effective price > list/negotiated price; zero savings when prices are missing
  • Rationale: Why show negative values (transparency) vs zero values (mathematical consistency)
  • Example scenarios: 5-row comparison table showing different price combinations and their savings display
  • UI guidance: Ready-to-use tooltip examples for better user experience
  • Integration: Cross-references to related error codes and troubleshooting

🔗 Enhanced Existing Documentation

  • Rate optimization report: Added savings calculation reference in Total savings section
  • Cost summary report: Added savings calculation reference in KPIs section
  • Error documentation: Enhanced 3 error codes with cross-references to new documentation

📊 Key Behaviors Documented

List Price Effective Price Savings Displayed Explanation
$100 $80 $20 Standard savings
$100 $120 -$20 Negative savings - overpaid
Missing $80 $0 Cannot calculate without list price

Impact

  • Builds user trust in cost optimization data
  • Reduces confusion and support requests about "negative" or "zero" savings
  • Provides consistent interpretation guidance across Power BI and Azure Data Explorer tools
  • Enables better decision-making when reviewing cost-saving recommendations

Fixes #1740.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: arthurclares <53261392+arthurclares@users.noreply.github.com>
@Copilot Copilot AI changed the title [WIP] Document behavior for negative and missing savings values in cost calculations Document behavior for negative and missing savings values in cost calculations Jul 2, 2025
Copilot finished work on behalf of arthurclares July 2, 2025 10:08
Copy link
Collaborator

@arthurclares arthurclares left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Initial review done. Waiting for more feedback.


**Negative savings are displayed when the effective price paid is higher than the list price or negotiated price.** This indicates the resource cost more than standard pricing, which can happen due to:

- Pricing misconfigurations
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Pricing misconfigurations


- Pricing misconfigurations
- Unusual billing conditions
- Data quality issues in Cost Management
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@flanakin How do you feel about this one?


### Why show zero savings for missing prices

When price data is missing, there's no reliable basis for calculating savings. Showing zero ensures:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
When price data is missing, there's no reliable basis for calculating savings. Showing zero ensures:
When price data is missing, there's no reliable basis for calculating savings.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Applied your suggestion to simplify the explanation. Commit 55b7114


When price data is missing, there's no reliable basis for calculating savings. Showing zero ensures:

- Mathematical consistency in totals and aggregations
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Mathematical consistency in totals and aggregations

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed the bullet points as suggested. Commit 55b7114

When price data is missing, there's no reliable basis for calculating savings. Showing zero ensures:

- Mathematical consistency in totals and aggregations
- No misleading information is presented
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- No misleading information is presented

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed the bullet points as suggested. Commit 55b7114


- Mathematical consistency in totals and aggregations
- No misleading information is presented
- Clear indication that savings couldn't be determined
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Clear indication that savings couldn't be determined

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed the bullet points as suggested. Commit 55b7114


### Including negative savings in totals

When negative savings are included in aggregated totals:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@flanakin Can you confirm if this is true?

Comment on lines 138 to 161

When displaying savings in reports or dashboards, consider adding contextual information:

### For negative savings display

> **ℹ️ Note**: Savings may appear negative if the effective price is higher than the list or negotiated price. This may indicate pricing misconfigurations or unexpected billing conditions. [Learn more about savings calculations](savings-calculations.md).

### For zero savings display

> **ℹ️ Note**: Savings show as zero when price data is missing or incomplete. Export price sheets or use FinOps hubs to get complete savings calculations. [Learn more about savings calculations](savings-calculations.md).

<br>

## Related errors and troubleshooting

Several error codes in FinOps toolkit relate to missing price data that affects savings calculations:

- [`MissingListUnitPrice`](errors.md#missinglistunitprice) - List prices missing, preventing savings calculation
- [`MissingContractedUnitPrice`](errors.md#missingcontractedunitprice) - Contracted prices missing, preventing savings calculation
- [`MissingListCost`](errors.md#missinglistcost) - List cost values missing
- [`MissingContractedCost`](errors.md#missingcontractedcost) - Contracted cost values missing
- [`ListCostLessThanContractedCost`](errors.md#listcostlessthancontractedcost) - Data quality issue causing invalid savings
- [`ContractedCostLessThanEffectiveCost`](errors.md#contractedcostlessthaneffectivecost) - Data quality issue causing negative savings

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
When displaying savings in reports or dashboards, consider adding contextual information:
### For negative savings display
> **ℹ️ Note**: Savings may appear negative if the effective price is higher than the list or negotiated price. This may indicate pricing misconfigurations or unexpected billing conditions. [Learn more about savings calculations](savings-calculations.md).
### For zero savings display
> **ℹ️ Note**: Savings show as zero when price data is missing or incomplete. Export price sheets or use FinOps hubs to get complete savings calculations. [Learn more about savings calculations](savings-calculations.md).
<br>
## Related errors and troubleshooting
Several error codes in FinOps toolkit relate to missing price data that affects savings calculations:
- [`MissingListUnitPrice`](errors.md#missinglistunitprice) - List prices missing, preventing savings calculation
- [`MissingContractedUnitPrice`](errors.md#missingcontractedunitprice) - Contracted prices missing, preventing savings calculation
- [`MissingListCost`](errors.md#missinglistcost) - List cost values missing
- [`MissingContractedCost`](errors.md#missingcontractedcost) - Contracted cost values missing
- [`ListCostLessThanContractedCost`](errors.md#listcostlessthancontractedcost) - Data quality issue causing invalid savings
- [`ContractedCostLessThanEffectiveCost`](errors.md#contractedcostlessthaneffectivecost) - Data quality issue causing negative savings

Comment on lines 163 to 175

<br>

## Give feedback

Let us know how we're doing with a quick review. We use these reviews to improve and expand FinOps tools and resources.

> [!div class="nextstepaction"]
> [Give feedback](https://portal.azure.com/#view/HubsExtension/InProductFeedbackBlade/extensionName/FinOpsToolkit/cesQuestion/How%20easy%20or%20hard%20is%20it%20to%20understand%20savings%20calculations%20in%20FinOps%20toolkit%20reports%3F/cvaQuestion/How%20valuable%20is%20the%20savings%20calculations%20documentation%3F/surveyId/FTK0.11/bladeName/Toolkit/featureName/Help.SavingsCalculations)

<br>

## Related content
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<br>
## Give feedback
Let us know how we're doing with a quick review. We use these reviews to improve and expand FinOps tools and resources.
> [!div class="nextstepaction"]
> [Give feedback](https://portal.azure.com/#view/HubsExtension/InProductFeedbackBlade/extensionName/FinOpsToolkit/cesQuestion/How%20easy%20or%20hard%20is%20it%20to%20understand%20savings%20calculations%20in%20FinOps%20toolkit%20reports%3F/cvaQuestion/How%20valuable%20is%20the%20savings%20calculations%20documentation%3F/surveyId/FTK0.11/bladeName/Toolkit/featureName/Help.SavingsCalculations)
<br>
## Related content
## Troubleshooting
For troubleshooting these issues, see [Troubleshoot common FinOps toolkit errors](errors.md).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Simplified the troubleshooting section as suggested. Commit 55b7114

@arthurclares arthurclares marked this pull request as ready for review July 2, 2025 13:44
@arthurclares arthurclares requested a review from MSBrett as a code owner July 2, 2025 13:44
Co-authored-by: arthurclares <53261392+arthurclares@users.noreply.github.com>
Copilot finished work on behalf of arthurclares July 2, 2025 13:48
3. **Validate data quality** - Confirm Cost Management data is accurate
4. **Consider optimization** - Evaluate if commitment discounts are providing value

#### Diagnostic query for negative savings
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@flanakin I added this here, but I question if this should actually be in the troubleshooting doc. Feel free to move it if you prefer it somewhere else.
I copied this code from issue #1424

@flanakin flanakin added this to the 2025-07 - July milestone Jul 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs: Review 👀 PR that is ready to be reviewed Skill: DevOps GitHub setup and automation Skill: Documentation Documentation updates Tool: FinOps guide Implementing FinOps guide
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Document behavior for negative and missing savings values in cost calculations
5 participants