As a data analyst, you need to ensure that your senior leadership clearly sees the day-to-day ins and outs of the business. They need to quickly get a pulse on the organization to be prepared to make sudden changes in their strategy. Learn how...
This workbook teaches you how to get started with Microsoft Power BI and the integration with Adobe Analytics Cloud.
The Adobe Analytics Cloud is provided by Adobe and can be accessed at https://experiencecloud.adobe.com. Power BI is a service provided by Microsoft and can be accessed at https://powerbi.microsoft.com. Microsft offers a free trial of Power BI that you will use throughout this workbook. And there will be some Power BI features covered in this workbook not available in the free version.
Adobe -
Microsoft -
For the following exercise, we will use Power BI Desktop to teach you how to connect, transform and visualize data, which can then be published and shared with other users in the Power BI Service.
In this exercise, we will bring some data from an Excel workbook into Power BI Desktop, to build a report. Please download this file to your local machine’s Desktop folder before moving to the next steps.
You can download the Excel file from this location: https://1drv.ms/f/s!AmfmHLh2qqs6w7dQy0AZ55_-zaOMcQ
Launch Power BI Desktop from your Start menu.
In the Start Page, select Get Data.
Within the Open File dialog, browse and select the Excel file that you downloaded.
After selecting the Excel file, Power BI Desktop will try to detect data in it. You will see the Navigator dialog with one sheet detected.
In this exercise, we will continue the process of bring some data from an Excel workbook into Power BI Desktop but walk through applying some Data Transformations using Power Query.
This is the surface area for Data Transformations within Power BI Desktop. Power Query is also available in other products, such as Excel. The Power Query Editor dialog exposes over 300 data transformations for you to work with.
Start in the Power Query Editor dialog opened from the last step of the previous exercise.
We need to apply the following data transformations to our Excel data to get it into the right shape:
Remove the “Promoted Headers” and “Changed Type” steps from the Applied Steps pane on the right.
Transform -> Transpose, which will turn rows into columns.
Transform -> Use First Row as Headers, to promote the first row of data to become the headers in our table.
We now need to fill down values within the first column, to propagate City values to all rows with Sales data for each city. Select Column1 and apply the Fill Down transformation, which you can find under Transform -> Fill -> Fill Down.
Rename Columns: Column1 to City, and Column2 to Category.
We need to unpivot columns with yearly sales data. To do so, select the first two columns (City and Category) and use: Transform -> Unpivot Columns -> Unpivot Other Columns.
This will ensure that any columns in this table, except City and Category, get unpivoted. This means that, in the future, if a new column appears on the Excel file (i.e. with Sales data for another year), the column will be automatically unpivoted as part of our Power BI query. You will end up with a shape as follows:
We can rename columns again: Attribute to Year, and Value to Total Sales.
Finally, let’s also change the column type for the Year column, from Text to Date. This will default to January 1st for each year. You can use the type indicator icon on the header of a column to adjust its data type.
Once loading of data has completed, we’re ready to start building data visualizations on top of this data from the Report view. We can also further enrich this data with measures, hierarchies, cross-table relationships and other Data Modeling concepts. You can find out more about these Power BI Desktop capabilities in the following tutorials:
Modeling your data using Power BI Desktop: https://docs.microsoft.com/en-us/power-bi/guided-learning/modeling?tutorial-step=1#step-0
Introduction to visuals in Power BI: https://docs.microsoft.com/en-us/power-bi/guided-learning/visualizations?tutorial-step=1
Below you can find a screenshot that includes the two visuals that we just built on the left, along with:
- A line chart showing Total Sales by Year.
- A tree map showing Total Sales by City and Category.
- A Waterfall chart showing the % of Total sales by year.
In this Lesson you will be working with the Power BI Desktop application to create and setup requests for data from Adobe Analytics. These requests will load data into Dataset Tables in Power BI. From there you will be able to modify, manage, and use the data to build reports that can be shared with your peers and leadership.
Workflow in Microsoft Power BI desktop
Let's start by building your first request for data from Adobe Analytics in Power BI. We are going to be using the Page dimension and Page Views metric in this exercise.
Launch the Power BI desktop application. (If it is not open already)
Click "Get Data" in the ribbon menu under Home.
Search for "Adobe Analytics" in the dialog. Select "Adobe Analyitcs" from the list on the right and then click Connect.
Select "Sign-in" and proceed through the prompts.
IMPORTANT NOTE: Sign-in with the Adobe ID provided to you in the lab.
After successfully connecting, you will be presented with a Navigator. This Navigator organizes the the list of report suites available for you to use by Login Company. Clicking on a Login Compnay will list the associated report suites. And within each report suite the available assets are grouped under three different categories; date granularity, dimensions, and metrics.
Data Granularity provides Power BI friendly date columns
Dimensions contains the reporting dimensions from Adobe Analytics
Measures contains the metrics from Adobe Analytics
Note: Power BI sources the items as you interact so it is important to expand the list before searching
Check the box next to Page
Remove the search criteria to expose all the items and categories
Click the arrow next to Measures and then search for "Page Views"
Check the box next to Page Views
Now look at the right pane in the Navigator. In the bottom section you will see a preview of the Page and Page Views items you've selected. In the upper section you will find more configuration options.
In the upper right section of the Navigator scroll down to expose the option of Top and enter a value of "50". This will configure the request to return up to 50 pages.
Click Apply, then click Load.
The Navigator will submit the request and close. After the request to Adobe Analytics is complete you'll see a new Dataset Table added under the FIELDS section, found on the right side of the screen.
Great job! You created your first dataset table in Power BI populated with data from Adobe Analytics. Now let's use the Power Query Editor and update this dataset table to use a dynamic date range versus a static value.
Right-click on the Dataset Table name then select Edit Query, or hover over the Dataset Table name then click the ellipsis (...) then select Edit Query.
On the left side of the new dialog you'll see a list of Queries. Click on Page Report.
Under the Home tab of the menu ribbon click Advanced Editor
You will be presented with the editor that will allow you to modify the request. Over the next few steps we will walk through editing the Cube.ApplyParameter of DateRange.
Note: The DateRange parameter has two #date(YYYY, M, D) entries representing the Start and End dates that were configured in the Navigator.
DateTime.Date( DateTime.LocalNow() - #duration(1,0,0,0) ), DateTime.Date( DateTime.LocalNow() - #duration(1,0,0,0) )
Understanding Power Query M Functions
DateTime.Date() Returns a date part from a DateTime value
DateTime.LocalNow() Returns a datetime value set to the current date and time on the system.
#duration Creates a duration value from #duration(days as number, hours as number, minutes as number, seconds as number) as duration
For more information see https://docs.microsoft.com/en-us/powerquery-m/power-query-m-function-reference
Afer you are done the DateRange parameter line should look like this:
{Cube.ApplyParameter, "DateRange", {DateTime.Date( DateTime.LocalNow() - #duration(1,0,0,0) ), DateTime.Date( DateTime.LocalNow() - #duration(1,0,0,0) )}},
Let's create another common type of data request from Adobe Analytics. This request will be for time series data consisting of the Visitors, Visits, and Page Views metrics by day.
- Click "Get Data" in the menu ribbon under Home
- Search for "Adobe Analytics" and select it from the list then click Connect
- Expand the LOGIN_COMPANY then REPORT_SUITE
For the next step we are going add the specific Date Granularity items we will need to create a time series dataset by day.
Expand the "Date Granularity" tree until you see the "Level" fields
Check the boxes for the following items
Level 1: Year
Level 2: Month
Level 3: Day
Now expand the Measures
Find and apply the following
Visitors
Visits
Page Views
Click Load
Rename the new dataset table to "Traffic Day Report" (refer to step 13 from Exercise 2.1)
The dataset contains three separate columns that when combine represent the day. Let's transform the columns and merge them together so we end up with a single day column.
Right-click on the Dataset Table name then select Edit Query, or hover over the Dataset Table name then click the ellipsis (...) then select Edit Query.
Click in the header of the Month column to select it.
Now while holding CTRL+ALT (this allows you select multiple columns) click on Day and then Year.
Note: The order used when selecting the columns will be important for the next step.
Scroll to the right in the main section of the Power Query Editor and you will find the new column. Its data type has defaulted to string so let's update it with data type of date.
Select the new column, Day, so it is highlighted.
Open the drop down menu "Data Type: Text" found under the Transform tab. Then select Date.
Take a look at the expanded list of columns in the "Traffic Day Report" dataset and you will see the new Day column. Now we are going to expand the date range so Day will contain more than a single item. Let us configuring the query to include all the days of the current month up until yesterday. This will be very similar to the modification we applied to the "Page Report" dataset in Exercise 2.1.
Right-click on the Dataset Table name then select Edit Query, or hover over the Dataset Table name then click the ellipsis (...) then select Edit Query.
On the left side of the new dialog you'll see a Queries list containing your query. Click on "Traffic Day Report".
Under the Home tab of the menu ribbon click Advanced Editor
Replace the content in the DateRange parameter between the curly brackets. Enter the following:
DateTime.Date( Date.StartOfMonth( DateTime.LocalNow() ) ) , DateTime.Date( DateTime.LocalNow() - #duration(1,0,0,0) )
Understanding Power Query M Functions
Date.StartOfMonth() Returns a DateTime value representing the start of the month.
Afer you are done the DateRange parameter line should look like this:
{Cube.ApplyParameter, "DateRange", {DateTime.Date( Date.StartOfMonth( DateTime.LocalNow() ) ) , DateTime.Date( DateTime.LocalNow() - #duration(1,0,0,0) )}},
You are on a roll! You've successfully created and customized two datasets populated with traffic data from Adobe Analytics into your Power BI project.
In this next exercise you are going to use these new datasets and create a traffic report. This will get you familar with the Power BI user interface and some aspects of working with visualizations.
The Power BI user experience has 3 main areas you will work with when creating reports. From left to right in the diagram below, there is the (1) canvas, (2) visualization controls, and (3) dataset tables. You've already been working with the dataset tables in the prior exercises.
Let's see what Power BI does when we start select items from the Page Report dataset table.
What happened? Power BI automatically selected a visualization that it determined was best suited for the data and in this case it was a table visualization.
Note: Maintaining your select on the visualization in the canvas is important. If this action added the Page Views measure to the existing visualization then you are all set. If it created a new visualization that means you had clicked off the current visualization in the canvas. Select the table visualization containing the Page values again and then click the box next to "Page Views".
Click in the white space of the canvas area to deselect the current visualization.
Expand the "Traffic Day Report" dataset and then click the box next to Day, Visitors, Visits, and Page Views.
Notice a different visualization was automatically selected.
The visualization has grouped all the metrics by Year and not by Day. The visualization does this because it's defaulting to a Date Heirarchy view. Let's change the setting and show the individual days in the visualization.
Now with some basic visualizations setup let's cover a few of the available formatting options.
Tip: Click on the side or upper area of the visualization. Clicking in the header will resort the table and clicking on an element will highlight it as you select the visualization.
Click "Column headers" and it will expand. Then scroll to find the "Text size" and increase it to 16.
Now find the "Text size" for "Values" and set it to 12.
Let's also increase the "Text size" for the other visualization.
Take some time to explore other format options. For example:
Now, no report is finished until it has a title and some annontations to provide context for the recipient.
Give your report a title. Something like "Yesterday's Page Engagement and the Monthly Traffic Trend".
Increase the text size to 28 and then resize the text box area to fit title.
Select the Page Report visualization and then enable the Title found in the format options.
Expand the title option and type in a title of "Yesterday's top 50 pages" then increase the text size to 16.
After you've completed annotating your report select the Publish button found in the Home tab.
Save the Power BI project
Authenticate with your Power BI account (if you are not currently logged in)
Select a destination
Click Select
Wait for it to complete publishing and after it's successful click "Got it"
Your project is now saved and available in the Power BI Service (online). In the Power BI Service you can schedule the refresh of the datasets, access and customize reports, and create dashboards to share with users across your organization. And all of this from the convenience of a web browser making it accessible across different platforms.
In this lab we explored how to use Microsoft Power BI and how to get data from Adobe Analytics using the available Adobe Analytics Connector. We were able to cover another common method for loading data and some basics on visualizations and formatting. We encourage you to take what you've learned here and to continue exploring Power BI and the integration with Adobe Analytics using your own organizations report suites. Here are some steps to help get you started.
Power BI
Adobe Analytics
To use the Adobe Analytics Connector you will need to use your Adobe ID, linked to your Adobe Analytics account. This is the account you use to login at https://experiencecloud.adobe.com.
Your analytics account must also be permissioned with Web Services Access. This permission allows your account to access the Reporting APIs used by Adobe Analytics Connector in Power BI to submit and retrieve the data from your report suites. Check with your Adobe Analytics administrator to confirm your account permissions before using the Connector.
Configure your published datasets with a scheduled refresh in the Power BI Service (see the Appendix for steps specific to Adobe Analytics datasets
https://docs.microsoft.com/en-us/power-bi/refresh-scheduled-refresh
Create a Power BI dashboard from a report
https://docs.microsoft.com/en-us/power-bi/service-dashboard-create
Share your Power BI dashboards and reports with coworkers and others
https://docs.microsoft.com/en-us/power-bi/service-share-dashboards
Modeling your data using Power BI Desktop
https://docs.microsoft.com/en-us/power-bi/guided-learning/modeling?tutorial-step=1#step-0
Introduction to visuals in Power BI
https://docs.microsoft.com/en-us/power-bi/guided-learning/visualizations?tutorial-step=1
Check out this video for an overview of the Adobe Analytics Connector available in Power BI and be sure to share it with your peers
https://www.youtube.com/watch?v=Nf716LdR0z8
Connect to Adobe Analytics in Microsoft Power BI Desktop
https://docs.microsoft.com/en-us/power-bi/desktop-connect-adobe-analytics
Learn about the other integrations available for Adobe Analytics and Microsoft Power BI
https://www.adobe.com/data-analytics-cloud/analytics/power-bi.html
When a request is initially configured it will be implemented with a static date range, the default is for today's date. And while you can change the Start and End date values in the Navigator when creating the request it will still result in a static setting. Here are the steps you can follow to update your query with a dynamic reporting date range that will automatically shift based on the current time when ever the data is refreshed.
Right-click on a Dataset Table name then select Edit Query, or hover over the Dataset Table name then click the ellipsis (...) then select Edit Query.
On the left side of the new dialog you'll see a Queries list containing your query. Click on query you would like to edit.
Under the Home tab of the menu ribbon click Advanced Editor
You will be presented with a text editor.
let Source = AdobeAnalytics.Cubes([HierarchicalNavigation=true]), #"LOGIN COMPANY" = Source{[Name="LOGIN COMPANY"]}[Data], REPORTSUITEID = #"LOGIN COMPANY"{[Id="REPORTSUITEID"]}[Data], #"Added Items" = Cube.Transform(REPORTSUITEID, { {Cube.ApplyParameter, "DateRange", {#date(2019, 2, 4), #date(2019, 2, 4)}}, {Cube.AddAndExpandDimensionColumn, "page", {"page"}, {"Page"}}, {Cube.AddMeasureColumn, "Page Views", "pageviews"} }) in #"Added Items"
Replace with one of the following
Yesterday
Start = yesterday
End = yesterday
DateTime.Date( DateTime.LocalNow() - #duration(1,0,0,0) ), DateTime.Date( DateTime.LocalNow() - #duration(1,0,0,0) )
Last 7 days from yesterday
Start = 8 days go
End = yesterday
DateTime.Date( DateTime.LocalNow() - #duration(8,0,0,0) ), DateTime.Date( DateTime.LocalNow() - #duration(1,0,0,0) )
Week to date (excluding today with week start on Monday)
Start = first day of the current week
End = yesterday
DateTime.Date( Date.StartOfWeek( DateTime.LocalNow() - #duration(1,0,0,0), Day.Monday ) ) , DateTime.Date( DateTime.LocalNow() - #duration(1,0,0,0) )
Month to date (excluding today)
Start = first day of the current month
End = yesterday
DateTime.Date( Date.StartOfMonth( DateTime.LocalNow() - #duration(1,0,0,0) ) ) , DateTime.Date( DateTime.LocalNow() - #duration(1,0,0,0) )
Using the Week to date syntax. Here is an example of what you should end up with:
let Source = AdobeAnalytics.Cubes([HierarchicalNavigation=true]), #"LOGIN COMPANY" = Source{[Name="LOGIN COMPANY"]}[Data], REPORTSUITEID = #"LOGIN COMPANY"{[Id="REPORTSUITEID"]}[Data], #"Added Items" = Cube.Transform(REPORTSUITEID, { {Cube.ApplyParameter, "DateRange", {DateTime.Date( Date.StartOfWeek( DateTime.LocalNow() - #duration(1,0,0,0), Day.Monday ) ) , DateTime.Date( DateTime.LocalNow() - #duration(1,0,0,0) )}}, {Cube.AddAndExpandDimensionColumn, "page", {"page"}, {"Page"}}, {Cube.AddMeasureColumn, "Page Views", "pageviews"} }) in #"Added Items"
For more information about Power Query M Functions see
https://docs.microsoft.com/en-us/powerquery-m/power-query-m-function-reference
When you configure a request using the Date Granularity items each item selected populates in a separate column. Before you can use these columns as dates in your visualizations you will need to transform them into a new merged column and set the appropriate data type. Here are the steps to follow:
Right-click on the Dataset Table name then select Edit Query, or hover over the Dataset Table name then click the ellipsis (...) then select Edit Query.
Click in the header of the Month column to select it.
Now while holding CTRL+ALT (this allows you select multiple columns) click on Day and then Year.
Note: The order used when selecting the columns will be important for the next step.
Scroll to the right in the main section of the Power Query Editor and you will find the new column. Its data type has defaulted to string so let's update it with data type of date.
Select the new column, Day, so it is highlighted.
Open the drop down menu "Data Type: Text" found under the Transform tab. Then select Date.
After publishing new projects from Power BI Desktop to the Power BI Service you will want to configure a scheduled refresh for the datasets. Follow the instructions here to set and manage that schedule.
Click "Sign In" in the upper right corner and processed through the authentication steps using your Power BI account
In the left rail find "My Workspaces" and click on it
Click on the Datasets tab in the main area
Find the name of your published project and then click on the "Schedule refresh" icon under the ACTIONS column.
It's a good practice to update your credentials for Adobe Analytics when you set or modify the scheduled refresh
Expand "Data source credentials" and then click on "Edit credentials". Proceed through the authentication prompts and remember to use your Adobe ID.
Expand "Scheduled refresh"
Toggle on the "Keep your data up to date" setting
Choose a "Refresh frequency". The default is Daily but you can change it to Weekly
Set the Time zone
(optional) Add a Time. If you choose not to specify a time Power BI will update shortly after midnight. Otherwise, the Power BI service targets initiating the refresh of your data within 15 minutes of your scheduled refresh time.
Pro Tip: After two months of inactivity, scheduled refresh on your dataset is paused. A dataset is considered inactive when no user has visited any dashboard or report built on the dataset. At that time, the dataset owner is sent an email indicating the scheduled refresh is paused, and the refresh schedule for the dataset is displayed as disabled. To resume scheduled refresh, simply revisit any dashboard or report built on the dataset.
Find more information about Configuring scheduled refresh in Power BI
https://docs.microsoft.com/en-us/power-bi/refresh-scheduled-refresh