AdobeAnalytics.Cubes

D

T

The M Code Behind the Power Query M function AdobeAnalytics.Cubes

Introduction to Adobe Analytics

Adobe Analytics is a digital analytics tool used by marketers, analysts, and businesses to track and analyze website traffic, user behavior, and campaigns. Adobe Analytics provides various features to help users to analyze their website data. Adobe Analytics.Cubes is one such feature that enables users to create custom cubes and perform complex data analysis. The AdobeAnalytics.Cubes M function in Power Query helps to connect, transform, and load data from Adobe Analytics.Cubes into Excel or Power BI.

The M Code behind the AdobeAnalytics.Cubes Function

The AdobeAnalytics.Cubes M function is a part of the Power Query M function library. It helps users to connect to Adobe Analytics.Cubes, fetch data, and transform it according to their requirements. Here is the M code behind the AdobeAnalytics.Cubes function:


let

Source = AdobeAnalytics.Cubes(

cubeID,

startDate,

endDate,

dimensions,

metrics,

segments,

dateGranularity,

timePeriods,

customGranularity,

customGranularityName,

maxRows

),

#"Expanded Data" = Table.ExpandTableColumn(

Source,

"Data",

{"Row", "Value"},

{"Row", "Value"}

),

#"Pivoted Column" = Table.Pivot(

#"Expanded Data",

List.Distinct(#"Expanded Data"[Row]),

"Row",

"Value",

List.Sum

)

in

#"Pivoted Column"


This code consists of three main sections:

Section 1: AdobeAnalytics.Cubes Function Parameters

The first section of the code defines the AdobeAnalytics.Cubes function parameters. These parameters are used to connect to Adobe Analytics.Cubes and fetch the required data. Here is the list of AdobeAnalytics.Cubes function parameters:

1. cubeID: The ID of the Adobe Analytics.Cubes data cube.

2. startDate: The start date of the data range.

3. endDate: The end date of the data range.

4. dimensions: The list of dimensions to fetch data for.

5. metrics: The list of metrics to fetch data for.

6. segments: The list of segments to filter data.

7. dateGranularity: The date granularity for the data.

8. timePeriods: The list of time periods to fetch data for.

9. customGranularity: The custom granularity for the data.

10. customGranularityName: The name of the custom granularity.

11. maxRows: The maximum number of rows to fetch.

Section 2: Expand Data Table

The second section of the code expands the Data table column. The Data table column contains the Row and Value columns for each metric. This section expands the Data table column into separate Row and Value columns for each metric.

Section 3: Pivot Table

The third section of the code pivots the expanded data table. It converts the Row and Value columns into separate columns for each metric. This section also sums the values for each metric and creates a new table with the pivoted data.

The AdobeAnalytics.Cubes M function in Power Query helps users to connect, transform, and load data from Adobe Analytics.Cubes into Excel or Power BI. The M code behind the AdobeAnalytics.Cubes function consists of three main sections: the AdobeAnalytics.Cubes function parameters, the Expand Data table, and the Pivot table. This code enables users to perform complex data transformations and analysis with Adobe Analytics data.

Power Query and M Training Courses by G Com Solutions (0800 998 9248)

Upcoming Courses

Contact Us

    Subject

    Your Name (required)

    Company/Organisation

    Email (required)

    Telephone

    Training Course(s)

    Your Message

    Upload Example Document(s) (Zip multiple files)