MicrosoftAzureConsumptionInsights.Contents

Updated on

MicrosoftAzureConsumptionInsights.Contents is a Power Query M function that provides advanced query functions.

Compatible with: Power BI Service Power BI Desktop Excel Microsoft 365

Syntax

MicrosoftAzureConsumptionInsights.Contents(
   enrollmentNumber as any,
   optional parameters as nullable record,
) as table

Description

Provide advanced query functions.

Examples

Assuming today is 2017-6-15, get summaries data between 2017-5-1 to 2017-6-15

// Output: Function will return summaries data between 2017-5-1 to 2017-6-15

      let    
          enrollmentNumber = "100",
          optionalParameters = [ numberOfMonth = 1 ],
          result = MicrosoftAzureConsumptionInsights.Contents( enrollmentNumber, optionalParameters )   
      in     
          result
    

Assuming today is 2017-6-15, get summaries data for April 2017.

// Output: Function will return data between 2017-4-1 and 2017-4-30

      let    
          enrollmentNumber = "100",
          optionalParameters = [ startBillingDataWindow = "-2", endBillingDataWindow = "-1" ],
          result = MicrosoftAzureConsumptionInsights.Contents( enrollmentNumber, optionalParameters )   
      in     
          result
    

Assuming today is 2017-6-15, get summaries data from April 2017 till now.

// Output: Function will return data between 2017-4-1 and 2017-6-15

      let    
          enrollmentNumber = "100",
          optionalParameters = [ startBillingDataWindow = "-2", endBillingDataWindow = "0", dataType = "Summaries" ],
          result = MicrosoftAzureConsumptionInsights.Contents( enrollmentNumber, optionalParameters )   
      in     
          result
    

Assuming today is 2017-6-15, get summaries data from last December till this February

// Output: Function will return data between 2016-12-1 and 2017-2-28

      let    
          enrollmentNumber = "100",
          optionalParameters = [ startBillingDataWindow = "-6", endBillingDataWindow = "-3", dataType = "Summaries" ],
          result = MicrosoftAzureConsumptionInsights.Contents( enrollmentNumber, optionalParameters )
      in     
          result
    

Assuming today is 2017-6-15, get marketplace charges for last 18 month

// Output: Function will return data between 2015-12-1 and 2017-6-15

      let    
          enrollmentNumber = "100",
          optionalParameters = [ startBillingDataWindow = "-18", endBillingDataWindow = "0", dataType = "MarketplaceCharges" ],
          result = MicrosoftAzureConsumptionInsights.Contents( enrollmentNumber, optionalParameters )   
      in     
          result
    

Assuming today is 2017-6-15, get detail charges for June 2017 and May 2017

// Output: Function will return data between 2017-5-1 and 2017-6-15

      let    
          enrollmentNumber = "100",
          optionalParameters = [ startBillingDataWindow = "-1", endBillingDataWindow = "0", dataType = "DetailCharges" ],
          result = MicrosoftAzureConsumptionInsights.Contents( enrollmentNumber, optionalParameters )   
      in     
          result
    

Assuming today is 2017-07-03, get detail charges for July 2016

// Output: Function will return data between 2016-07-01 and 2016-07-31

      let  
          enrollmentNumber = "100",
          optionalParameters = [ startBillingDataWindow = "-12", endBillingDataWindow = "-11", dataType = "DetailCharges" ],
          result = MicrosoftAzureConsumptionInsights.Contents( enrollmentNumber, optionalParameters )    
      in     
          result
    

Assuming today is 2017-7-13, get balance summaries for past 10 month plus 13 days of this month

// Output: Function will return data between 2016-9-1 and 2017-7-13

      let  
          enrollmentNumber = "100",
          optionalParameters = [ dataType = "Summaries", numberOfMonth = 10 ],
          result = MicrosoftAzureConsumptionInsights.Contents( enrollmentNumber, optionalParameters )    
      in     
          result
    

Other functions related to MicrosoftAzureConsumptionInsights.Contents are:

Contribute » | Contributors: Rick de Groot

2023-2024 © BI Gorilla. All rights are reserved. Information from Microsoft docs is property of Microsoft Corp. | Privacy Policy