Forum Discussion

Pmeems's avatar
Pmeems
Copper Contributor
Sep 20, 2022
Solved

How to add Cost Management per resource group to workbook?

Via the Portal I can go to Cost Management + Billing > Cost Management > Costs Analysis (preview) > Resource. And with a resource group selected as the scope I get a very nice overview with the tota...
  • Clive_Watson's avatar
    Sep 20, 2022

    Pmeems 

     

    You can start with a basic query like

    let price_ = 4.20;
    union *
    | where _IsBillable == True
    // | where ResourceGroup == "< name of RG > "
    | where isnotempty(Resource)
    | summarize  rgtotalGBytes =sumif(_BilledSize, isnotempty(ResourceGroup)), pricePerGB = sum(_BilledSize)/(1024*1024*1024) * price_  by ResourceGroup, Resource
    | order by rgtotalGBytes desc