This article documents how to accomplish a number of use cases using the Customer Journey Analytics BI extension. Each use case explains the Customer Journey Analytics functionality, followed with details for each of the BI tools supported:
The following use cases are documented:
Connect
Report and analyze
Understand
The connect use case focuses on how to connect BI tools using the Customer Journey Analytics BI extension.
The report and analysis use cases instruct how to accomplish similar Customer Journey Analytics visualizations in the BI tools currently supported.
The understand use cases provide more details on:
This use case sets up the connection from the BI tool to Customer Journey Analytics, lists the available data views, and selects a data view to use.
The instructions refer to an example environment with the following objects:
When you go through the use cases, replace these example objects with objects that are appropriate for your specific environment.
Access the required credentials and parameters from the Experience Platform Query Service UI.
Navigate to your Experience Platform sandbox.
Select Queries from the left rail.
Select Credentials tab in the Queries interface.
Select prod:cja
from the Database dropdown menu.
Start Power BI Desktop.
:
as the value for Server. For example: examplecompany.platform-query.adobe.io:80
.?FLATTEN
to the value that you paste. For example, prod:cja?FLATTEN
.Power BI Desktop supports the following scenarios for the FLATTEN
parameter. See Flatten nested data for more information.
FLATTEN parameter | Example | Supported | Remarks |
---|---|---|---|
None | prod:cja |
||
?FLATTEN |
prod:cja?FLATTEN |
Recommended option to use! | |
%3FFLATTEN |
prod:cja%3FFLATTEN |
Power BI Desktop displays error: We couldn’t authenticate with the credentials provided. Please try again. |
Access the required credentials and parameters from the Experience Platform Query Service UI.
Navigate to your Experience Platform sandbox.
Select Queries from the left rail.
Select Credentials tab in the Queries interface.
Select prod:cja
from the Database dropdown menu.
Start Tableau.
Select PostgreSQL from the left rail underneath To a Server. If not available, select More… and select PostgreSQL from the Installed Connectors.
In the PostgreSQL dialog, in the General tab:
%3FFLATTEN
to the value that you paste. For example: prod:cja%3FFLATTEN
.You see a Progressing Request dialog while Tableau Desktop validates the connection.
In the main window, you see in the Data Source page, in the left pane:
The main window displays details of the cc_data_view data view.
Tableau Desktop supports the following scenarios for the FLATTEN
parameter. See Flatten nested data for more information.
FLATTEN parameter | Example | Supported | Remarks |
---|---|---|---|
None | prod:cja |
||
?FLATTEN |
prod:cja?FLATTEN |
||
%3FFLATTEN |
prod:cja%3FFLATTEN |
Recommended option to use. Note, %3FFLATTEN is URL-encoded version of ?FLATTEN . |
In this use case, you want to display a table and simple line visualization that shows a daily trend of occurrences (events) from January 1, 2023 up until January 31, 2023.
An example Daily Trend panel for the use case:
Ensure you have validated a successful connection and can list and use data views for the BI tool for which you want to try out this use case.
In the Data pane:
You see a table displaying the occurrences for the current month. For better visibility, enlarge the visualization.
In the Filters pane:
1/1/2023
And is before 2/1/2023.
You can use the calendar icon to pick and select dates.You see the table updated with the applied daterangeday filter.
In the Visualizations pane, select the Line chart visualization.
A line chart visualization replaces the table while using the same data as the table. Your Power BI Desktop should look like below.
On the Line chart visualization:
The main view is updated to show both a line visualization and a table. Your Power BI Desktop should look like below.
Select the Sheet 1 tab at the bottom to switch from the Data source view. In the Sheet 1 view:
Drag the Daterange entry from the Tables list in the Data pane and drop the entry onto the Filters shelf.
In the Filters Field [Daterange] dialog, select Range of Dates and select Next >.
In the Filter [Daterange] dialog, select Range of dates and specify a period of 01/01/2023
- 01/02/2023
.
Drag and drop Daterangeday from the Tables list in the Data pane and drop the entry in the field next to Columns.
Drag and drop Occurrences from the Tables (Measure Names) list in the Data pane and drop the entry in the field next to Rows. The value is automatically converted to SUM(Occurrences).
Modify Standard to Entire View from the Fit dropdown menu in the toolbar.
Your Tableau Desktop should look like below.
Select Duplicate from the Sheet 1 tab context menu to create a second sheet.
Select Rename from the Sheet 1 tab context menu to rename the sheet to Graph
.
Select Rename from the Sheet 1 (2) tab context menu to rename the sheet to Data
.
Ensure that the Data sheet is selected. In the Data view:
Select Show me at the top right and select Text table (upper left top visualization) to modify the content of the Data view to a table.
Select Swap Rows and Columns from the toolbar.
Modify Standard to Entire View from the Fit dropdown menu in the toolbar.
Your Tableau Desktop should look like below.
Select the New Dashboard tab button (at the bottom) to create a new Dashboard 1 view. In the Dashboard 1 view:
Drag and drop the Graph sheet from the Sheets shelf onto the Dashboard 1 view that reads Drop sheets here.
Drag and drop the Data sheet from the Sheets shelf below the Graph sheet onto the Dashboard 1 view.
Select the Data sheet in the view and modify Entire View to Fix Width.
Your Tableau Desktop should look like below.
In this use case, you want to display a table and simple line visualization that shows an hourly trend of occurrences(events) for January 1, 2023.
An example Hourly Trend panel for the use case:
Ensure you have validated a successful connection, can list data views, and use a data view for the BI tool for which you want to try out this use case.
Power BI does not understand how to handle date-time fields, so dimensions like daterangehour and daterangeminute are not supported.
Select the Sheet 1 tab at the bottom to switch from Data source. In the Sheet 1 view:
Drag the Daterange entry from the Tables list in the Data pane and drop the entry onto the Filters shelf.
In the Filters Field [Daterange] dialog, select Range of Dates and select Next >.
In the Filter [Daterange] dialog, select Range of dates and specify a period of 01/01/2023
- 02/01/2023
.
Drag and drop Daterangehour from the Tables list in the Data pane and drop the entry in the field next to Columns.
Drag and drop Occurrences from the Tables (Measure Names) list in the Data pane and drop the entry in the field next to Rows. The value is automatically converted to SUM(Occurrences).
Modify Standard to Entire View from the Fit dropdown menu in the toolbar.
Your Tableau Desktop should look like below.
Select Duplicate from the Sheet 1 tab context menu to create a second sheet.
Select Rename from the Sheet 1 tab context menu to rename the sheet to Graph
.
Select Rename from the Sheet 1 (2) tab context menu to rename the sheet to Data
.
Ensure that the Data sheet is selected. In the Data view:
Select Show me at the top right and select Text table (upper left top visualization) to modify the content of the Data view to a table.
Drag HOUR(Daterangeday) from Columns to Rows.
Modify Standard to Entire View from the Fit dropdown menu in the toolbar.
Your Tableau Desktop should look like below.
Select New Dashboard tab button (at the bottom) to create a new Dashboard 1 view. In the Dashboard 1 view:
Drag and drop the Graph sheet from the Sheets shelf onto the Dashboard 1 view that reads Drop sheets here.
Drag and drop the Data sheet from the Sheets shelf below the Graph sheet onto the Dashboard 1 view.
Select the Data sheet in the view and modify Entire View to Fix Width.
Your Dashboard 1 view should look like below.
In this use case, you want to display a table and simple line visualization that shows a monthly trend of occurrence (events) for 2023.
An example Monthly Trend panel for the use case:
Ensure you have validated a successful connection, can list data views, and use a data view for the BI tool for which you want to try out this use case.
In the Data pane:
You see a table displaying the occurrences for the current month. For better visibility, enlarge the visualization.
In the Filters pane:
1/1/2023
And is before 1/1/2024.
You can use the calendar icon to pick and select dates.You see the table updated with the applied daterangemonth filter.
In the Visualizations pane:
A line chart visualization replaces the table while using the same data as the table. Your Power BI Desktop should look like below.
On the Line chart visualization:
The main view is updated to show both a line visualization and a table. Your Power BI Desktop should look like below.
Select the Sheet 1 tab at the bottom to switch from Data source. In the Sheet 1 view:
Drag the Daterange entry from the Tables list in the Data pane and drop the entry onto the Filters shelf.
In the Filters Field [Daterange] dialog, select Range of Dates and select Next >.
In the Filter [Daterange] dialog, select Range of dates and specify a period of 01/01/2023
- 01/01/2024
.
Drag and drop Daterangeday from the Tables list in the Data pane and drop the entry in the field next to Columns.
Drag and drop Occurrences from the Tables (Measure Names) list in the Data pane and drop the entry in the field next to Rows. The value is automatically converted to SUM(Occurrences).
Modify Standard to Entire View from the Fit dropdown menu in the toolbar.
Your Tableau Desktop should look like below.
Select Duplicate from the Sheet 1 tab context menu to create a second sheet.
Select Rename from the Sheet 1 tab context menu to rename the sheet to Graph
.
Select Rename from the Sheet 1 (2) tab context menu to rename the sheet to Data
.
Ensure that the Data sheet is selected. In the Data view:
Select Show me at the top right and select Text table (upper left top visualization) to modify the content of the Data view to a table.
Drag MONTH(Daterangeday) from Columns to Rows.
Modify Standard to Entire View from the Fit dropdown menu in the toolbar.
Your Tableau Desktop should look like below.
Select New Dashboard tab button (at the bottom) to create a new Dashboard 1 view. In the Dashboard 1 view:
Drag and drop the Graph sheet from the Sheets shelf onto the Dashboard 1 view that reads Drop sheets here.
Drag and drop the Data sheet from the Sheets shelf below the Graph sheet onto the Dashboard 1 view.
Select the Data sheet in the view and modify Entire View to Fix Width.
Your Tableau Desktop should look like below.
In this use case, you want to display a table and simple bar visualization that shows the purchases and purchases revenue for product names over 2023.
An example Single Dimension Ranked panel for the use case:
Ensure you have validated a successful connection, can list data views, and use a data view for the BI tool for which you want to try out this use case.
In the Data pane:
You see an empty table displaying only the column headers for the selected element. For better visibility, enlarge the visualization.
In the Filters pane:
1
calendar years.You see the table updated with the applied daterange filter.
In the Visualization pane:
On the Table visualization:
In the Filters pane:
10
By value.You see the table updated with values for purchase revenue in sync with the Freeform table visualization in Analysis Workspace.
In the Visualizations pane:
A line and stacked column chart visualization replaces the table while using the same data as the table.
Drag and drop purchases onto Line y-axis in the Visualizations pane.
The line and stacked column chart is updated. Your Power BI Desktop should look like below.
On the Line and stacked column chart visualization:
The main view is updated to show both a line visualization and a table.
Select the Sheet 1 tab at the bottom to switch from Data source. In the Sheet 1 view:
Drag the Daterange entry from the Tables list in the Data pane and drop the entry onto the Filters shelf.
In the Filters Field [Daterange] dialog, select Range of Dates and select Next >.
In the Filter [Daterange] dialog, select Range of dates and specify a period of 01/01/2023
- 31/12/2024
. Select Apply and OK.
Drag and drop Product Name from the Tables list in the Data pane and drop the entry in the field next to Rows.
Drag and drop Purchases from the Tables (Measure Names) list in the Data pane and drop the entry in the field next to Rows. The value is automatically converted to SUM(Purchases).
Drag and drop Purchase Revenue from the Tables (Measure Names) list in the Data pane and drop the entry in the field next to Columns and left from SUM(Purchases). The value is automatically converted to SUM(Purchase Revenue).
To order both charts in descending purchase revenue order, hover over the Purchase Revenue title and select the sort icon.
To limit the number of entries in the charts, select SUM(Purchase Revenue) in Rows and from the dropdown menu select Filter.
In the Filter [Purchase Revenue] dialog select Range of values and enter appropriate values. For example: 1,000,000
- 2,000,000
. Select Apply and OK.
To convert the two bar charts to a dual combination chart, select SUM(Purchases) in Rows and from the dropdown menu, select Dual Axis. The bar charts transform into a scatter plot.
To modify the scatter plot to a bar chart:
Your Tableau Desktop should look like below.
Select Duplicate from the Sheet 1 tab context menu to create a second sheet.
Select Rename from the Sheet 1 tab context menu to rename the sheet to Data
.
Select Rename from the Sheet 1 (2) tab context menu to rename the sheet to Graph
.
Ensure that the Data sheet is selected.
Your Tableau Desktop should look like below.
Select New Dashboard tab button (at the bottom) to create a new Dashboard 1 view. In the Dashboard 1 view:
Your Dashboard 1 view should look like below.
In this use case, you want to display a table that breaks down the purchase revenue and purchases for product names within product categories over 2023. On top of that you want to use some visualizations to illustrate both the product category distribution and product name contributions within each product category.
An example Multiple Dimension Ranked panel for the use case:
Ensure you have validated a successful connection, can list data views, and use a data view for the BI tool for which you want to try out this use case.
To ensure the date range apply to all visualizations, drag and drop daterangeday from the Data pane on to Filters on this page.
1
calendar years.In the Data pane:
To modify the vertical bar chart to a Table, ensure you have the table selected and select Matrix from the Visualizations pane.
To limit the number of displayed products within the table, select product_name is (All) in the Filters pane.
15
By Value.To improve readability, select View from the top menu, and select Page View > Actual size and resize the table visualization.
To break down each category in the table, select + at the product category level. Your Power BI Desktop should look like below.
Select Home from the top menu, and select New visual. A new visual is added to your report.
In the Data pane:
To modify the visual, select the bar chart and select Treemap from the Visualizations pane.
Ensure that product_category is listed underneath Category, and product_name is listed underneath Details in the Visualizations pane.
Your Power BI Desktop should look like below.
Select Home from the top menu, and select New visual. A new visual is added to your report.
In the Data pane:
In the Visualizations pane:
In the report, reshuffle the individual visualizations.
Your Power BI Desktop should look like below.
Select the Sheet 1 tab at the bottom to switch from Data source. In the Sheet 1 view:
Drag the Daterange entry from the Tables list in the Data pane and drop the entry onto the Filters shelf.
In the Filters Field [Daterange] dialog, select Range of Dates and select Next >.
In the Filter [Daterange] dialog, select Relative dates, select Years, and specify Previous year. Select Apply and OK.
Your Tableau Desktop should look like below.
Drag Product Category and drop next to Columns.
Drag Purchase Revenue and drop next to Rows. The value changes to SUM(Purchase Revenue).
Drag Purchases and drop next to Rows. The value changes to SUM(Purchases).
Select SUM(Purchases) and from the dropdown menu select Dual Axis.
Select SUM(Purchases) in Marks and select Line from the dropdown menu.
Select SUM(Purchase Revenue) in Marks and select Bar from the dropdown menu.
Select Entire View from the Fit menu.
Select the Purchase Revenue title in the chart and ensure that the purchase revenue is in ascending order.
Your Tableau Desktop should look like below.
Rename the current Sheet 1 sheet to Category
.
Select New Worksheet to create a new sheet, and rename it to Data
.
Drag the Daterange entry from the Tables list in the Data pane and drop the entry onto the Filters shelf.
In the Filters Field [Daterange] dialog, select Range of Dates and select Next >.
In the Filter [Daterange] dialog, select Relative dates, select Years, and specify Previous year. Select Apply and OK.
Drag Purchase Revenue from Data pane to Columns. The value changes to SUM(Purchase Revenue).
Drag Purchase from Data pane to Columns, next to Purchase Revenue. The value changes to SUM(Purchases).
Drag Product Category from the Data pane to Rows.
Drag Product Name from the Data pane to Rows, next to Product Category.
To change the two horizontal bars to a table, select Text Table from Show Me.
To limit the number of products, select Purchases in Measure Values. From the dropdown menu, select Filter.
In the Filter [Purchases] dialog, select At least and enter 7000
. Select Apply and OK.
Select Fit Width from the Fit dropdown menu.
Your Tableau Desktop should look like below.
Select New worksheet to create a new sheet and rename it to Treemap.
Drag the Daterange entry from the Tables list in the Data pane and drop the entry onto the Filters shelf.
In the Filters Field [Daterange] dialog, select Range of Dates and select Next >.
In the Filter [Daterange] dialog, select Relative dates, select Years, and specify Previous year. Select Apply and OK.
Drag Purchase Revenue from the Data pane to Rows. The values changes to SUM(Purchase Revenue).
Drag Purchase from the Data pane to Rows, next to Purchase Revenue. The value changes to SUM(Purchases).
Drag Product Category from the Data pane to Columns.
Drag Product Name from the Data pane to Columns.
To change the two vertical bar charts to a treemap, select Treemap from Show Me.
To limit the number of products, select Purchases in Measure Values. From the dropdown menu, select Filter.
In the Filter [Purchases] dialog, select At least and enter 7000
. Select Apply and OK.
Select Fit Width from the Fit dropdown menu.
Your Tableau Desktop should look like below.
Select New Dashboard tab button (at the bottom) to create a new Dashboard 1 view. In the Dashboard 1 view:
Your Dashboard 1 view should look like below.
In this use case, you want to get the distinct number of product names that have been reported on during January 2023.
To report on a distinct count of product names, you set up a calculated metric in Customer Journey Analytics, with Title Product Name (Count Distinct)
and External Id product_name_count_distinct
.
You then can use that metric in an example Count Distinct Dimension Values panel for the use case:
Ensure you have validated a successful connection, can list data views, and use a data view for the BI tool for which you want to try out this use case.
To ensure the date range apply to all visualizations, drag and drop daterangeday from the Data pane on to Filters on this page.
1/1/2023
And is before 2/1/2023
.In the Data pane:
To modify the vertical bar chart to a Table, ensure you have the chart selected and select Table from the Visualizations pane.
Your Power BI Desktop should look like below.
Select the table visualization. From the context menu, select Copy > Copy visual.
Paste the visualization using ctrl-v. The exact copy of the visualization overlaps the original one. Move it to the right in the report area.
To modify the copied visualization from a table to a card, select Card from Visualizations.
Your Power BI Desktop should look like below.
Alternatively, you can use the count distinct functionality from Power BI.
Select the product_name dimension.
Apply the Count (Distinct) function on the product_name dimension in Columns.
Select the Sheet 1 tab at the bottom to switch from Data source. In the Sheet 1 view:
Drag the Daterange entry from the Tables list in the Data pane and drop the entry onto the Filters shelf.
In the Filter Field [Daterange] dialog, select Range of Dates and select Next >.
In the Filter [Daterange] dialog, select Range of dates, and select 01/01/2023
- 31/1/2023
. Select Apply and OK.
Drag Cm Product Name Count Distinct to Rows. The value changes to SUM(Cm Product Name Count Distinct). This field is the calculated metric that you have defined in Customer Journey Analytics.
Drag Daterangeday and drop next to Columns. Select Daterangeday and from the dropdown menu select Day.
To modify the lines visualization to a table, select Text Table from Show Me.
Select Swap Rows and Columns from the toolbar.
Select Fit Width from the Fit dropdown menu.
Your Tableau Desktop should look like below.
Select Duplicate from the Sheet 1 tab context menu to create a second sheet.
Select Rename from the Sheet 1 tab context menu to rename the sheet to Data
.
Select Rename from the Sheet 1 (2) tab context menu to rename the sheet to Card
.
Ensure you have selected the Card view.
Select DAY(Daterangeday) and from the dropdown menu select Month. The value changes to MONTH(Daterangeday).
Select SUM(Cm Product Name Count Distinct) in Marks and from the dropdown menu select Format.
To change the font size, in the Format SUM(CM Product Name Count Distinct) pane, select Font within Default and select 72 for the font size.
To align the number, select Automatic next to Alignment and set Horizontal to centered.
To use whole numbers, select 123.456 next to Numbers and select Number (Custom). Set Decimal places to 0
.
Your Tableau Desktop should look like below.
Select New Dashboard tab button (at the bottom) to create a new Dashboard 1 view. In the Dashboard 1 view:
Your Dashboard 1 view should look like below.
Alternatively, you can use the count distinct functionality from Tableau Desktop.
Use Product Name instead of Cm Product Name Count Distinct.
Apply Measure > Count (Distinct) on Product Name in Marks.
In this use case you want to use a date range that you have defined in Customer Journey Analytics to filter and report on occurrences (events) during the last year.
To report using a date range, you set up a date range in Customer Journey Analytics, with Title Last Year 2023
.
You then can use that date range in an example Using Date Range Names To Filter panel for the use case:
Note how the date range defined in the Freeform table visualization overrules the date range applied to the panel.
Ensure you have validated a successful connection, can list data views, and use a data view for the BI tool for which you want to try out this use case.
In the Data pane:
You see a visualization displaying Error fetching data for this visual.
In the Filters pane:
You see the table updated with the applied daterangeName filter. Your Power BI Desktop should look like below.
Select the Sheet 1 tab at the bottom to switch from Data source. In the Sheet 1 view:
Drag the Daterange Name entry from the Tables list in the Filters shelf.
In the Filter [Daterange Name] dialog ensure Select from list is selected, and select Last Year 2023 from the list. Select Apply and OK.
Drag Daterangemonth entry from the Tables list and drop the entry in the field next to Rows… Select Daterangemonth and select Month. The value changes to MONTH(Daterangemonth).
Drag Occurrences entry from the Tables list and drop the entry in the field next to Columns… The value changes to SUM(Occurrences).
Select Text Table from Show Me.
Select Swap Rows and Columns from the toolbar.
Select Fit Width from the Fit dropdown menu.
Your Tableau Desktop should look like below.
In this use case, you want to use an existing filter for the Fishing product category, that you have defined in Customer Journey Analytics, to filter and report on product names and occurrences (events) during January 2023.
Inspect the filter that you want to use in Customer Journey Analytics.
You then can use that filter in an example Using Date Range Names To Filter panel for the use case:
Ensure you have validated a successful connection, can list data views, and use a data view for the BI tool for which you want to try out this use case.
You see a visualization displaying Error fetching data for this visual.
In the Filters pane:
1/1/2023
And is before 2/1/2023
.You see the table updated with the applied filterName filter. Your Power BI Desktop should look like below.
Select the Sheet 1 tab at the bottom to switch from Data source. In the Sheet 1 view:
Drag the Filter Name entry from the Tables list in the Filters shelf.
In the Filter [Filter Name] dialog ensure Select from list is selected, and select Fishing Products from the list. Select Apply and OK.
Drag Daterange entry from the Tables list in the Filters shelf.
In the Filter Field [Daterange] dialog, select Range of Dates and select Next >.
In the Filter [Daterange] dialog, select Range of dates, and select 01/01/2023
- 01/02/2023
. Select Apply and OK.
Drag Product Name from the Tables list to Rows.
Drag Occurrences entry from the Tables list and drop the entry in the field next to Columns… The value changes to SUM(Occurrences).
Select Text Table from Show Me.
Select Fit Width from the Fit dropdown menu.
Your Tableau Desktop should look like below.
You create a new filter in Customer Journey Analytics that filters on products from the hunting product category. Then you want to use the new filter to report on product names and occurrences (events) for products from the hunting category during January 2023.
Create a new filter with Title Hunting Products
in Customer Journey Analytics.
You then can use that filter in an example Using Dimension Values To Filter panel for the use case:
Ensure you have validated a successful connection, can list data views, and use a data view for the BI tool for which you want to try out this use case.
Select Home from the menu, then select Refresh from the toolbar. You need to refresh the connection to pick up the new filter you just defined in Customer Journey Analytics.
In the Data pane:
You see a visualization displaying Error fetching data for this visual.
In the Filters pane:
1/1/2023
And is before 2/1/2023
.You see the table updated with the applied filterName filter. Your Power BI Desktop should look like below.
In the Data Source view, underneath Data, from the context menu on cc_data_view(prod:cja%3FFLATTEN), select Refresh. You need to refresh the connection to pick up the new filter you just defined in Customer Journey Analytics.
Select the Sheet 1 tab at the bottom to switch from Data source. In the Sheet 1 view:
Drag the Filter Name entry from the Tables list in the Filters shelf.
In the Filter [Filter Name] dialog ensure Select from list is selected, and select Hunting Products from the list. Select Apply and OK.
Drag Daterange entry from the Tables list in the Filters shelf.
In the Filter Field [Daterange] dialog, select Range of Dates and select Next >.
In the Filter [Daterange] dialog, select Range of dates, and select 01/01/2023
- 1/2/2023
. Select Apply and OK.
Drag Product Name from the Tables list to Rows.
Drag Occurrences entry from the Tables list and drop the entry in the field next to Columns… The value changes to SUM(Occurrences).
Select Text Table from Show Me.
Select Fit Width from the Fit dropdown menu.
Your Tableau Desktop should look like below.
In this use case, you want to report on purchase revenue and purchases for product names during January 2023, sorted in descending purchase revenue order.
An example Sort panel for the use case:
Ensure you have validated a successful connection, can list data views, and use a data view for the BI tool for which you want to try out this use case.
In the Data pane:
In the Filters pane:
1/1/2023
And is before 2/1/2023
.In the Visualizations pane:
In the report, select Sum of purchase_revenue to sort the table in descending order of purchase revenue.
Your Power BI Desktop should look like below.
The query executed by Power BI Desktop using the BI extension is not including a sort
statement. The lack of a sort
statement implies that the sort is executed client side.
select "_"."product_name",
"_"."a0",
"_"."a1"
from
(
select "rows"."product_name" as "product_name",
sum("rows"."purchases") as "a0",
sum("rows"."purchase_revenue") as "a1"
from
(
select "_"."daterangeName",
"_"."daterange",
"_"."filterId",
"_"."filterName",
"_"."timestamp",
"_"."affiliate_name",
"_"."affiliate_url",
"_"."commerce.order.priceTotal",
"_"."customer_city",
"_"."customer_region",
"_"."daterangeday",
"_"."daterangefifteenminute",
"_"."daterangefiveminute",
"_"."daterangehour",
"_"."daterangeminute",
"_"."daterangemonth",
"_"."daterangequarter",
"_"."daterangesecond",
"_"."daterangethirtyminute",
"_"."daterangeweek",
"_"."daterangeyear",
"_"."hitdatetime",
"_"."page_name",
"_"."page_url",
"_"."product_category",
"_"."product_name",
"_"."product_short_review",
"_"."product_subCategory",
"_"."referrer_url",
"_"."search_engine",
"_"."search_keywords",
"_"."store_city",
"_"."store_name",
"_"."store_region",
"_"."store_type",
"_"."timepartdayofmonth",
"_"."timepartdayofweek",
"_"."timepartdayofyear",
"_"."timeparthourofday",
"_"."timepartminuteofhour",
"_"."timepartmonthofyear",
"_"."timepartquarterofyear",
"_"."timepartweekofyear",
"_"."cm_session_end_rate_defaultmetric",
"_"."cm_session_person_defaultmetric",
"_"."cm_session_start_rate_defaultmetric",
"_"."cm_timespent_person_defaultmetric",
"_"."cm_timespent_session_defaultmetric",
"_"."cm_product_name_count_distinct",
"_"."ad_views",
"_"."adobe_sessionends",
"_"."adobe_sessionstarts",
"_"."adobe_timespent",
"_"."exchange_buybacks",
"_"."exchange_cost",
"_"."exchange_purchases",
"_"."exchange_revenue",
"_"."occurrences",
"_"."page_views",
"_"."product_quantity",
"_"."product_reviews",
"_"."product_views",
"_"."purchase_revenue",
"_"."purchases",
"_"."visitors",
"_"."visits"
from "public"."cc_data_view" "_"
where "_"."daterange" < date '2023-02-01' and "_"."daterange" >= date '2023-01-01'
) "rows"
group by "product_name"
) "_"
where not "_"."a0" is null or not "_"."a1" is null
limit 1000001
Drag Daterange entry from the Tables list in the Filters shelf.
In the Filter Field [Daterange] dialog, select Range of Dates and select Next >.
In the Filter [Daterange] dialog, select Range of dates, and select 01/01/2023
- 1/2/2023
. Select Apply and OK.
Drag Product Name from the Tables list and drop the entry in the field next to Rows.
Drag Purchases entry from the Tables list and drop the entry in the field next to Columns… The value changes to SUM(Purchases).
Drag Purchase Revenue entry from the Tables list and drop the entry in the field next to Columns, next to SUM(Purchases). The value changes to SUM(Purchase Revenue).
Select Text Table from Show Me.
Select Fit Width from the Fit dropdown menu.
Select the Purchase Revenue column header and sort the table on this column in descending order.
Your Tableau Desktop should look like below.
The query executed by Tableau Desktop using the BI extension is not including a sort
statement. The lack of this sort
statement implies that the sort is executed client side.
SELECT CAST("cc_data_view"."product_name" AS TEXT) AS "product_name",
SUM("cc_data_view"."occurrences") AS "sum:occurrences:ok",
SUM("cc_data_view"."purchase_revenue") AS "sum:purchase_revenue:ok",
SUM("cc_data_view"."purchases") AS "sum:purchases:ok"
FROM "public"."cc_data_view" "cc_data_view"
WHERE (("cc_data_view"."daterange" >= (DATE '2023-01-01')) AND ("cc_data_view"."daterange" <= (DATE '2023-02-01')))
GROUP BY 1
In this use case, you want to report on the top 5 occurrences of product names during 2023.
An example Limit panel for the use case:
Ensure you have validated a successful connection, can list data views, and use a data view for the BI tool for which you want to try out this use case.
In the Data pane:
In the Filters pane:
1
calendar years.5
By value.In the Visualization pane:
Your Power BI Desktop should look like below.
The query executed by Power BI Desktop using the BI extension is including a limit
statement but not the one expected. The limit to the top 5 occurrences is enforced by Power BI Desktop using explicit product name results.
select "_"."product_name",
"_"."a0"
from
(
select "rows"."product_name" as "product_name",
sum("rows"."occurrences") as "a0"
from
(
select "_"."daterangeName",
"_"."daterange",
"_"."filterId",
"_"."filterName",
"_"."timestamp",
"_"."affiliate_name",
"_"."affiliate_url",
"_"."commerce.order.priceTotal",
"_"."customer_city",
"_"."customer_region",
"_"."daterangeday",
"_"."daterangefifteenminute",
"_"."daterangefiveminute",
"_"."daterangehour",
"_"."daterangeminute",
"_"."daterangemonth",
"_"."daterangequarter",
"_"."daterangesecond",
"_"."daterangethirtyminute",
"_"."daterangeweek",
"_"."daterangeyear",
"_"."hitdatetime",
"_"."page_name",
"_"."page_url",
"_"."product_category",
"_"."product_name",
"_"."product_short_review",
"_"."product_subCategory",
"_"."referrer_url",
"_"."search_engine",
"_"."search_keywords",
"_"."store_city",
"_"."store_name",
"_"."store_region",
"_"."store_type",
"_"."timepartdayofmonth",
"_"."timepartdayofweek",
"_"."timepartdayofyear",
"_"."timeparthourofday",
"_"."timepartminuteofhour",
"_"."timepartmonthofyear",
"_"."timepartquarterofyear",
"_"."timepartweekofyear",
"_"."cm_session_end_rate_defaultmetric",
"_"."cm_session_person_defaultmetric",
"_"."cm_session_start_rate_defaultmetric",
"_"."cm_timespent_person_defaultmetric",
"_"."cm_timespent_session_defaultmetric",
"_"."cm_product_name_count_distinct",
"_"."ad_views",
"_"."adobe_sessionends",
"_"."adobe_sessionstarts",
"_"."adobe_timespent",
"_"."exchange_buybacks",
"_"."exchange_cost",
"_"."exchange_purchases",
"_"."exchange_revenue",
"_"."occurrences",
"_"."page_views",
"_"."product_quantity",
"_"."product_reviews",
"_"."product_views",
"_"."purchase_revenue",
"_"."purchases",
"_"."visitors",
"_"."visits"
from "public"."cc_data_view" "_"
where (("_"."product_name" in ('Saltwater Monofilament Line', 'Pop-Up Beach Tent', 'Instant Pop-Up Tent', 'Envelop Sleeping Bag', 'Waterproof Tackle Bag')) and "_"."daterange" < date '2024-01-01') and "_"."daterange" >= date '2023-01-01'
) "rows"
group by "product_name"
) "_"
where not "_"."a0" is null
limit 1000001
In the Filter [Product Name] dialog, select the Top tab.
Select By field: Top 5
by Occurrences Sum.
Select Apply and OK.
You notice that the table disappears. Selecting the top 5 product names by occurrences does not work properly using this filter.
Select the Product Name in the Filter shelf and from the dropdown menu select Remove. The table reappears.
In the Filter [Occurrences] dialog, select At least.
Enter 47.799
as the value. This value ensures that only the top 5 items are shown in the table. Select Apply and OK.
Your Tableau Desktop should look like below.
As shown above, this query executed by Tableau Desktop, when defining a Top 5 occurrences filter on product names, fails.
SELECT CAST("cc_data_view"."product_name" AS TEXT) AS "product_name",
SUM("cc_data_view"."occurrences") AS "sum:occurrences:ok"
FROM "public"."cc_data_view" "cc_data_view"
INNER JOIN (
SELECT CAST("cc_data_view"."product_name" AS TEXT) AS "product_name",
SUM("cc_data_view"."occurrences") AS "$__alias__0"
FROM "public"."cc_data_view" "cc_data_view"
GROUP BY 1
ORDER BY 2 DESC,
1 ASC
LIMIT 5
) "t0" ON (CAST("cc_data_view"."product_name" AS TEXT) = "t0"."product_name")
WHERE (("cc_data_view"."daterange" >= (TIMESTAMP '2023-01-01 00:00:00.000')) AND ("cc_data_view"."daterange" < (TIMESTAMP '2024-01-01 00:00:00.000')))
GROUP BY 1
The query executed by Tableau Desktop, when defining a Top 5 filter on occurrences, is shown below. The limit is not visible in the query and applied client side.
SELECT CAST("cc_data_view"."product_name" AS TEXT) AS "product_name",
SUM("cc_data_view"."occurrences") AS "sum:occurrences:ok"
FROM "public"."cc_data_view" "cc_data_view"
WHERE (("cc_data_view"."daterange" >= (TIMESTAMP '2023-01-01 00:00:00.000')) AND ("cc_data_view"."daterange" < (TIMESTAMP '2024-01-01 00:00:00.000')))
GROUP BY 1
You want to understand the transformations of Customer Journey Analytics objects like dimensions, metrics, filters, calculated metrics, and date ranges by the various BI tools.
In Customer Journey Analytics, you define in a data view, which and how components of your datasets are exposed as dimensions and metrics. That definition of dimension and metrics is exposed to the BI tools using the BI extension.
You use components like Filters, Calculated metrics, and Date ranges as part of your Workspace projects. These components are also exposed to the BI tools using the BI extension.
Ensure you have validated a successful connection, can list data views, and use a data view for the BI tool for which you want to try out this use case.
The Customer Journey Analytics objects are available in the Data pane and are retrieved from the table you have selected in Power BI Desktop. For example, public.cc_data_view. The name of the table is the same as the External ID that you have defined for your data view in Customer Journey Analytics. For example, data view with Title C&C - Data View
and External ID cc_data_view
.
Dimensions
Dimensions from Customer Journey Analytics are identified by the Component ID. The Component ID is defined in your Customer Journey Analytics data view. For example, dimension Product Name in Customer Journey Analytics has a Component ID product_name, which is the name for the dimension in Power BI Desktop.
Date range dimensions from Customer Journey Analytics, like Day, Week, Month, and more are available as daterangeday, daterangeweek, daterangemonth, and more.
Metrics
Metrics from Customer Journey Analytics are identified by the Component ID. The Component ID is defined in your Customer Journey Analytics data view. For example, metric Purchase Revenue in Customer Journey Analytics has a Component ID purchase_revenue, which is the name for the metric in Power BI Desktop. A ∑ indicates metrics. When you use a metric in any visualization, the metric is renamed to Sum of metric.
Filters
Filters that you define in Customer Journey Analytics are available as part of the filterName field. When you use a filterName field in Power BI Desktop, you can specify which filter to use.
Calculated metrics
Calculated metrics that you define in Customer Journey Analytics are identified by the External ID you have defined for the calculated metric. For example, calculated metric Product Name (Count Distinct) has External ID product_name_count_distinct and is shown as cm_product_name_count_distinct in Power BI Desktop.
Date ranges
Date ranges that you define in Customer Journey Analytics are available as part of the daterangeName field. When you use a daterangeName field, you can specify which date range to use.
Custom transformations
Power BI Desktop provides custom transformation functionality using Data Analysis Expressions (DAX). As an example, you want to execute the Single dimension ranked use case with product names in lower case.
In the report view, select the bar visualization.
Select product_name in the Data pane.
Select New column in the toolbar.
In the formula editor, define a new column named product_name_lower
, like product_name_lower = LOWER('public.cc_data_view[product_name])
.
Ensure you select the new product_name_lower column in the Data pane instead of the product_name column.
Select Report as Table from in the table visualization.
Your Power BI Desktop should look like below.
The custom transformation result in an updates to SQL queries. See the use of the lower
function in the SQL example below:
select "_"."product_name_lower",
"_"."a0",
"_"."a1"
from
(
select "rows"."product_name_lower" as "product_name_lower",
sum("rows"."purchases") as "a0",
sum("rows"."purchase_revenue") as "a1"
from
(
select "_"."daterange" as "daterange",
"_"."product_name" as "product_name",
"_"."purchase_revenue" as "purchase_revenue",
"_"."purchases" as "purchases",
lower("_"."product_name") as "product_name_lower"
from
(
select "_"."daterange",
"_"."product_name",
"_"."purchase_revenue",
"_"."purchases"
from
(
select "daterange",
"product_name",
"purchase_revenue",
"purchases"
from "public"."cc_data_view" "$Table"
) "_"
where ("_"."daterange" < date '2024-01-01' and "_"."daterange" >= date '2023-01-01') and ("_"."product_name" in ('4G Cellular Trail Camera', '4K Wildlife Trail Camera', 'Wireless Trail Camera', '8-Person Cabin Tent', '20MP No-Glow Trail Camera', 'HD Wildlife Camera', '4-Season Mountaineering Tent', 'Trail Camera', '16MP Trail Camera with Solar Panel', '10-Person Family Tent'))
) "_"
) "rows"
group by "product_name_lower"
) "_"
where not "_"."a0" is null or not "_"."a1" is null
limit 1000001
The Customer Journey Analytics objects are available in the Data side bar whenever you work in a sheet. And are retrieved from the table that you have selected as part of the Data source page in Tableau. For example, cc_data_view. The name of the table is the same as the External ID that you have defined for your data view in Customer Journey Analytics. For example, data view with Title C&C - Data View
and External ID cc_data_view
.
Dimensions
Dimensions from Customer Journey Analytics are identified by the Component name. The Component name is defined in your Customer Journey Analytics data view. For example, dimension Product Name in Customer Journey Analytics has a Component name Product Name, which is the name for the dimension in Tableau. All dimensions are identified by Abc.
Date range dimensions from Customer Journey Analytics, like Day, Week, Month, and more are available as Daterangeday, Daterangeweek, Daterangemonth, and more. When you use a date range dimension, you have to select an appropriate definition of date or time to apply to that date range dimension from the dropdown menu. For example, Year, Quarter, Month, Day.
Metrics
Metrics from Customer Journey Analytics are identified by the Component Name. The Component Name is defined in your Customer Journey Analytics data view. For example, metric Purchase Revenue in Customer Journey Analytics has a Component Name Purchase Revenue, which is the name for the metric in Tableau. All metrics are identified by #. When you use a metric in any visualization, the metric is renamed to Sum(metric).
Filters
Filters that you define in Customer Journey Analytics are available as part of the Filter Name field. When you use a Filter Name field in Tableau, you can specify which filter to use.
Calculated metrics
Calculated metrics that you define in Customer Journey Analytics are identified by the Title you have defined for the calculated metric. For example, calculated metric Product Name (Count Distinct) has Title Product Name (Count Distinct) and is shown as Cm Product Name Count Distinct in Tableau.
Date ranges
Date ranges that you define in Customer Journey Analytics are available as part of the Daterange Name field. When you use a Daterange Name field, you can specify which date range to use.
Custom transformations
Tableau Desktop provides custom transformation functionality using Calculated Fields. As an example, you want to execute the Single dimension ranked use case with product names in lower case.
LOWER([Product Name])
.Your Tableau Desktop should look like below.
The custom transformation result in an updates to SQL queries. See the use of the LOWER
function in the SQL example below:
SELECT LOWER(CAST(CAST("cc_data_view"."product_name" AS TEXT) AS TEXT)) AS "Calculation_1562467608097775616",
SUM("cc_data_view"."purchase_revenue") AS "sum:purchase_revenue:ok",
SUM("cc_data_view"."purchases") AS "sum:purchases:ok"
FROM "public"."cc_data_view" "cc_data_view"
WHERE (("cc_data_view"."daterange" >= (DATE '2023-01-01')) AND ("cc_data_view"."daterange" <= (DATE '2023-12-31')))
GROUP BY 1
HAVING ((SUM("cc_data_view"."purchase_revenue") >= 999999.99999998999) AND (SUM("cc_data_view"."purchase_revenue") <= 2000000.00000002))
You want to understand how the visualizations, available in Customer Journey Analytics, can be similarly created using the available visualizations in the BI tools.
Customer Journey Analytics has a number of visualizations. See Visualizations for an introduction and an overview of all possible visualizations.
For most Customer Journey Analytics visualizations, Power BI Desktop offers equivalent experiences. See the table below.
Icon | Customer Journey Analytics visualization | Power BI Desktop visualization |
---|---|---|
Area | Area chart, stacked area chart and 100% area chart | |
Bar | Clustered column chart | |
Bar stacked | Stacked column chart and 100% stacked column chart | |
Bullet | ||
Cohort table | ||
Combo | Line and stacked column chart and Line and clustered column chart | |
Donut | Donut chart | |
Fallout | Funnel. | |
Flow | Decomposition tree? | |
Freeform table | Table and Matrix | |
Histogram | ||
Horizontal bar | Clustered bar chart | |
Horizontal bar stacked | Stacked bar chart and 100% stacked bar chart | |
Journey canvas | Decomposition tree | |
Key metric summary | ||
Line | Line chart | |
Scatter | Scatter chart | |
Section header | Text box | |
Summary change | Card | |
Summary number | Card | |
Text | Text box | |
Treemap | Treemap | |
Venn |
Power BI supports a drill mode to explore in-depth details on certain visualizations. In the example below, you analyze purchase revenue for product categories. From the context menu of a bar representing a product category, you can select Drill down.
Drill down updates the visualization with purchase revenue for products within the selected product category.
The drill down results in the following SQL query that uses a WHERE
clause:
select "_"."product_category" as "c25",
"_"."product_name" as "c26",
"_"."a0" as "a0"
from
(
select "_"."product_category",
"_"."product_name",
"_"."a0"
from
(
select "_"."product_category",
"_"."product_name",
"_"."a0"
from
(
select "rows"."product_category" as "product_category",
"rows"."product_name" as "product_name",
sum("rows"."purchase_revenue") as "a0"
from
(
select "_"."product_category",
"_"."product_name",
"_"."purchase_revenue"
from "public"."cc_data_view" "_"
where ("_"."daterange" >= date '2023-01-01' and "_"."product_category" = 'Fishing') and "_"."daterange" < date '2024-01-01'
) "rows"
group by "product_category",
"product_name"
) "_"
where not "_"."a0" is null
) "_"
) "_"
order by "_"."product_category",
"_"."product_name"
limit 1001
For most Customer Journey Analytics visualizations, Tableau offers equivalent experiences. See the table below.
Icon | Customer Journey Analytics visualization | Power BI Desktop visualization |
---|---|---|
Area | Area Chart | |
Bar | Bar Chart | |
Bar stacked | ||
Bullet | Bullet Graph | |
Cohort table | ||
Combo | Combination Charts | |
Donut | ||
Fallout | ||
Flow | ||
Freeform table | Text Table | |
Histogram | Histogram | |
Horizontal bar | Bar Chart | |
Horizontal bar stacked | Bar Chart | |
Journey canvas | ||
Key metric summary | ||
Line | Line Chart | |
Scatter | Scatter Plot | |
Section header | ||
Summary change | ||
Summary number | ||
Text | ||
Treemap | Treemap | |
Venn |
Tableau supports drill mode through hierarchies. In the example below, you create a hierarchy when you select the Product Name field within Tables and drag it on top of Product Category. Then, from the context menu of a bar representing a product category, you can select + Drill down.
Drill down will update the visualization with purchase revenue for products within the selected product category.
The drill down results in the following SQL query that is using a GROUP BY clause:
SELECT CAST("cc_data_view"."product_category" AS TEXT) AS "product_category",
CAST("cc_data_view"."product_name" AS TEXT) AS "product_name",
SUM("cc_data_view"."purchase_revenue") AS "sum:purchase_revenue:ok"
FROM "public"."cc_data_view" "cc_data_view"
WHERE (("cc_data_view"."daterange" >= (TIMESTAMP '2023-01-01 00:00:00.000')) AND ("cc_data_view"."daterange" < (TIMESTAMP '2024-01-01 00:00:00.000')))
GROUP BY 1,
2
The query does not limit the results to the selected product category; only the visualization shows the selected product category.
Alternatively, you can create a drill down dashboard where one visual is the result of the selection in another visual. In the example below, the Product Categories visualization is used as a filter to update the Product Names table. This visualization filter is client-only and does not result in an additional SQL query.
Each of the supported BI tools has some caveats in working with the Customer Journey Analytics BI extension.
Power BI Desktop Advanced date range filtering is exclusive. For your end date, you need to select one past the day you want to report on. For example is on or after 1/1/2023
and before 1/2/2023
.
Power BI Desktop defaults to Import when you create a connection. Please ensure you use Direct Query.
Power BI Desktop exposes data transformations through Power Query. Power Query primarily works with Import type connections so a many transformations that you apply like date or string functions throw an error saying you need to switch to an Import type connection. If you need to transform data at query time, you should use derived dimensions and metrics so Power BI doesn’t need to do the transforms itself.
Power BI Desktop does not understand how to handle date-time type columns so the daterangeX dimensions like daterangehour and daterangeminute are not supported.
Power BI Desktop by default tries to make multiple connections using up more Query Service sessions. Go in to the Power BI settings for your project and disable parallel queries.
Power BI Desktop does all sorting and limiting client-side. Power BI Desktop also has different semantics for top X filtering that includes tied values. So you cannot create the same sorting and limiting as you can do in Analysis Workspace.
Earlier versions of the Power BI Desktop October 2024 release break PostgreSQL data sources. Ensure you use the version mentioned in this article.
Tableau Desktop Range of Dates filtering is exclusive. For your end date, you need to select one past the day you want to report on.
By default, when you add a date or date-time dimension like Daterangemonth to the rows of a sheet, Tableau Desktop wraps the field in a YEAR() function. To get what you want, you need to select that dimension and from the dropdown menu select the date function you want to use. For example, change Year to Month when you are trying to use Daterangemonth.
Limiting results to the Top X is not obvious in Tableau Desktop. You can limit the results explicitly or using a calculated-field and the INDEX() function. Adding a Top X filter to a dimension generates complex SQL using an inner-join that is not supported.