chris-bowman / Azure-Cost-Reporting

151 stars 43 forks source link

Azure Cost Management Power BI Report

This report has been developed over a number of years as a starting point for building Azure Cost reporting using the Azure Cost Management Connector. This is something I have created in my spare time to help customers visualise Azure costs.


Sample Report Screenshot showing graphs and details of Azure usage

Version Info

As this report is provided as a sample, support is limited to the latest version. Link to changes.

Report Pages

Data Model

Most of the tables in the Power BI connector are included, although to reduce data size, some large text columns have been excluded (these can be seen in the Power Query Editor). Two static tables have been added for VM size and Managed Disk capacity (future scope to move these to API calls to auto-refresh).

In order to introduce support for MCA customers, some columns have been renamed to match EA tables as the data model is different between EA and MCA.

Note: In the table Subscriptions, there is a grouping column "SubscriptionGroup". You can modify these groups to group related subscriptions together and report based on this.

Report DataModel showing data tables and their relationships

Deploying the report

Prerequisites

Loading the data

  1. Open the Power BI template in Power BI Desktop.
  2. When prompted for parameters, enter your details as per Azure Cost Management Power BI Connector documentation.
    • For EA Customers, Select Entrollment Number, enter your Enrollment number (can be found in the Billing Account blade in the Azure Portal), and how many months of data to load.
      Parameter Settings Image
    • For MCA Customers, Select Manually Input Scope or Billing Profile Id per documentation, ScopeIdentifier as /providers/Microsoft.Billing/billingAccounts/{billingAccountId}[/billingProfiles/{billingProfileId}], substituting your billingAccountId and optionally provide billingProfileId (if you do use billingProfileId, make sure to remove the square brackets).
      Parameter Settings Image
  3. When prompted, you will need to sign into the Azure Cost Management connector with your Enterprise Admin or Enterprise Reader Azure AD account for EA customers, or appropriate Billing Account / Profile role for MCA customers.
  4. Enjoy!
  5. If you have Power BI service and licensing, you can also share or publish to a workspace and set up a recurring refresh schedule. See Ways to collaborate and share in Power BI for details


Notes on groups/tags


---
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE

We grant You a nonexclusive, royalty-free right to use and modify the Sample Report and to reproduce and distribute the object code form of the Sample Report, provided that You agree:

(i) to not use Our name, logo, or trademarks to market Your report in which the Sample Report is used;

(ii) to include a valid copyright notice on Your report in which the Sample Report is used;

and (iii) to indemnify, hold harmless, and defend Us and Our suppliers from and against any claims or lawsuits, including attorneys’ fees, that arise or result from the use or distribution of the Sample Report.