BI extension use cases

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:

  • Power BI Desktop. The version used is 2.137.1102.0 64-bit (October 2024).
  • Tableau Desktop. The version used is 2024.1.5 (20241.24.0705.0334) 64-bit.
  • Looker. Online version 25.0.23, available through looker.com
  • Jupyter Notebook. The version used is 7.3.2.
  • RStudio. The version used is 2024.12.0, build 467.

The following use cases are documented:

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:

  • Transformations that occur when you use a BI tools to report and analyze.
  • Visualization similarities and differences between Customer Journey Analytics and BI tools.
  • Caveats of each of the BI tools you should be aware of.

Connect and validate

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.

Customer Journey Analytics

The instructions refer to an example environment with the following objects:

  • Data view: C&C - Data View πŸ….
  • Dimensions: Product Name πŸ…‘ and Product Category πŸ…’.
  • Metrics: Purchase Revenue πŸ…“ and Purchases πŸ…”.
  • Filter: Fishing Products πŸ…•.

Customer Journey Analytics Base setup {modal="regular"}

When you go through the use cases, replace these example objects with objects that are appropriate for your specific environment.

BI tools
tabs
Power BI Desktop
  1. Access the required credentials and parameters from the Experience Platform Query Service UI.

    1. Navigate to your Experience Platform sandbox.

    2. Select Queries Queries from the left rail.

    3. Select Credentials tab in the Queries interface.

    4. Select prod:cja from the Database dropdown menu.

      Query service credentials {modal="regular"}

  2. Start Power BI Desktop.

    1. From the main interface, select Get data from other sources.

    2. In the Get Data dialog:

      PowerBI PostgreSQL database {modal="regular"}

      1. Search for and select PostgreSQL database.
      2. Select Connect.
    3. In the PostgreSQL database dialog:

      PowerBI Desktop Server and Database settings {modal="regular"}

      1. Use Copy to copy and paste the Host and Port values from the Experience Platform Query Expiring Credentials panel, separated by : as the value for Server. For example: examplecompany.platform-query.adobe.io:80.
      2. Use Copy to copy and paste the Database value from the Experience Platform Query Expiring Credentials panel. Add ?FLATTEN to the value that you paste. For example, prod:cja?FLATTEN.
      3. Select DirectQuery as the Data connectivity mode.
      4. Select OK.
    4. In the PostgreSQL database - Database dialog:

      PowerBI Desktop User and Password {modal="regular"}

      1. Use Copy to copy the Username and Password values from the Experience Platform Query Expiring Credentials panel in the User name and Password fields. If you are using a non-expiring credential, use the password of your non-expiring credential.
      2. Ensure that the dropdown menu for Select which level to apply these settings to is set to the Server that you have defined earlier.
      3. Select Connect.
    5. In the Navigator dialog, the data views are retrieved. This retrieval can take some time. Once retrieved, you see the following in Power BI Desktop.

      Power BI Destkop Load Data {modal="regular"}

      1. Select public.cc_data_view from the list in the left panel.

      2. You have two options:

        1. Select Load to continue and finish the setup.

        2. Select Transform Data. You see a dialog where you can optionally apply transformations as part of the configuration.

          Power BI Desktop Transform Data {modal="regular"}

          • Select Close & Apply.
    6. After a while, public.cc_data_view is displayed in the Data pane. Select ChevronRight to show dimensions and metrics.

      Power BI Destkop Server Data Loaded {modal="regular"}

To FLATTEN or not

Power BI Desktop supports the following scenarios for the FLATTEN parameter. See Flatten nested data for more information.

table 0-row-4 1-row-4 2-row-4 3-row-4 3-align-center 8-align-center 13-align-center 18-align-center
FLATTEN parameter Example Supported Remarks
None prod:cja CheckmarkCircle
?FLATTEN prod:cja?FLATTEN CheckmarkCircle Recommended option to use!
%3FFLATTEN prod:cja%3FFLATTEN CloseCircle Power BI Desktop displays error: We couldn’t authenticate with the credentials provided. Please try again.

More information

Tableau Desktop
  1. Access the required credentials and parameters from the Experience Platform Query Service UI.

    1. Navigate to your Experience Platform sandbox.

    2. Select Queries Queries from the left rail.

    3. Select Credentials tab in the Queries interface.

    4. Select prod:cja from the Database dropdown menu.

      Query service credentials {modal="regular"}

  2. Start Tableau.

    1. Select PostgreSQL from the left rail underneath To a Server. If not available, select More… and select PostgreSQL from the Installed Connectors.
      Tableau Connectors {modal="regular"}

    2. In the PostgreSQL dialog, in the General tab:
      Tableau Sign In dialog {modal="regular"}

      1. Use Copy to copy and paste the Host from the Experience Platform Query Expiring Credentials panel to the Server.
      2. Use Copy to copy and paste the Port from the Experience Platform Query Expiring Credentials panel to the Port.
      3. Use Copy to copy and paste the Database from the Experience Platform Query Expiring Credentials panel to the Database. Add %3FFLATTEN to the value that you paste. For example: prod:cja%3FFLATTEN.
      4. Select Username and Password from the Authentication dropdown menu.
      5. Use Copy to copy and paste the Username from the Experience Platform Query Expiring Credentials panel to the Username.
      6. Use Copy to copy and paste the Password from the Experience Platform Query Expiring Credentials panel to the Password. If you are using a non-expiring credential, use the password of your non-expiring credential.
      7. Ensure that Require SSL is checked.
      8. Select Sign In.

      You see a Progressing Request dialog while Tableau Desktop validates the connection.

    3. In the main window, you see in the Data Source page, in the left pane:

      • The name of the connection, underneath Connections.

      • The name of the database, underneath Database.

      • A list of tables, underneath Table.

        Tableau Connected {modal="regular"}

      1. Drag the cc_data_view entry and drop the entry on the main view that reads Drag tables here.
    4. The main window displays details of the cc_data_view data view.
      Tableau Connected {modal="regular"}

To FLATTEN or not

Tableau Desktop supports the following scenarios for the FLATTEN parameter. See Flatten nested data for more information.

table 0-row-4 1-row-4 2-row-4 3-row-4 3-align-center 8-align-center 13-align-center 18-align-center
FLATTEN parameter Example Supported Remarks
None prod:cja CheckmarkCircle
?FLATTEN prod:cja?FLATTEN CheckmarkCircle
%3FFLATTEN prod:cja%3FFLATTEN CheckmarkCircle Recommended option to use. Note, %3FFLATTEN is URL-encoded version of ?FLATTEN.

More information

Looker
  1. Access the required credentials and parameters from the Experience Platform Query Service UI.

    1. Navigate to your Experience Platform sandbox.

    2. Select Queries Queries from the left rail.

    3. Select Credentials tab in the Queries interface.

    4. Select prod:cja from the Database dropdown menu.

      Query service credentials {modal="regular"}

  2. Log in to Looker

    1. Select Admin from the left rail.

    2. Select Connections.

    3. Select Add Connection.

    4. In the Connect your database to Looker screen.

      Looker Connect to database {modal="regular"}

      1. Enter a Name for your connection, for example Example Looker Connection.
      2. Ensure All Projects is selected as the Connection Scope.
      3. Select PostgreSQL 9.5+ as the Dialect.
      4. Use Copy to copy and paste the Host value from the Experience Platform Query Expiring Credentials panel, as the value for Host. For example: examplecompany.platform-query.adobe.io.
      5. Use Copy to copy and paste the Port value from the Experience Platform Query Expiring Credentials panel, as the value for Port. For example: 80.
      6. Use Copy to copy and paste the Database value from the Experience Platform Query Expiring Credentials panel as the value for Database. Add %3FFLATTEN to the value that you paste. For example, prod:cja%3FFLATTEN.
      7. Use Copy to copy and paste the Username value from the Experience Platform Query Expiring Credentials panel as the value for Username.
      8. Use Copy to copy and paste the Password value from the Experience Platform Query Expiring Credentials panel as the value for Password.
      9. Select Expand all at Optional Settings.
      10. Set Max connections per node to 5.
      11. Ensure SSL is enabled.
      12. Select Test to test the connection. You should see a banner appear at the top of the screen with a message like Success, can connect JDBC ….
      13. Select Connect to establish and save the connection.
    5. You see the new connection in the Connections interface.

    6. Select ← from Admin to go to main navigation in the left rail.

    7. Select Develop.

    8. Select Projects.

    9. Select New Model in LookML Projects.

    10. To ensure you do not affect other users. select Enter Development Mode, when prompted.

    11. In the Create Model experience:

      1. In ➊ Select Database Connection:

        1. Select your database connection in Select database connection. For example: example_looker_connection.
        2. Name your project in Create a new LookML Project for this model. For example: example_looker_project.
        3. Select Next.
      2. In βž‹ Select Tables:

        1. Select public and then ensure your Customer Journey Analytics data view is selected. For example: SelectBox cc_data_view.
        2. Select Next.
      3. In ➌ Select Primary Keys:

        1. Select Next.
      4. In ➍ Select Explores to Create:

        1. Ensure you select your view. For example: cc_data_view.view.
        2. Select Next.
      5. In ➎ Enter Model Name:

        1. Name your model. For example: example_looker_model.
      6. Select Complete and Explore Data.

    You are redirected to the Explore interface of Looker, ready to explore the data.

To FLATTEN or not

Looker supports the following scenarios for the FLATTEN parameter. See Flatten nested data for more information.

table 0-row-4 1-row-4 2-row-4 3-row-4 3-align-center 8-align-center 13-align-center 18-align-center
FLATTEN parameter Example Supported Remarks
None prod:cja CheckmarkCircle
?FLATTEN prod:cja?FLATTEN CheckmarkCircle
%3FFLATTEN prod:cja%3FFLATTEN CheckmarkCircle Recommended option to use. Note, %3FFLATTEN is URL-encoded version of ?FLATTEN.

More information

Jupyter Notebook
  1. Access the required credentials and parameters from the Experience Platform Query Service UI.

    1. Navigate to your Experience Platform sandbox.

    2. Select Queries Queries from the left rail.

    3. Select Credentials tab in the Queries interface.

    4. Select prod:cja from the Database dropdown menu.

      Query service credentials {modal="regular"}

  2. Ensure you have set up a dedicated Python virtual environment for running your Jupyter Notebook environment.

  3. Ensure you have installed the required libraries in your virtual environment:

    • ipython-sql: pip install ipython-sql.
    • psycopg2-binary: pip install psycopg-binary.
    • sqlalchemy: pip install sqlalchemy.
  4. Start Jupyter Notebook from your virtual environment: jupyter notebook.

  5. Create a new notebook, or download this sample notebook.

  6. In your first cell, enter and execute:

    code language-none
    %config SqlMagic.style = '_DEPRECATED_DEFAULT'
    
  7. In a new cell, enter the config parameters for your connection. Use Copy to copy and paste values from the Experience Platform Query Expiring Credentials panel to the values required for the config parameters. For example:

    code language-none
    import ipywidgets as widgets
    from IPython.display import display
    
    config_host = widgets.Text(description='Host:', value='example.platform-query-stage.adobe.io',
                            layout=widgets.Layout(width="600px"))
    display(config_host)
    config_port = widgets.IntText(description='Port:', value=80,
                               layout=widgets.Layout(width="200px"))
    display(config_port)
    config_db = widgets.Text(description='Database:', value='prod:cja',
                          layout=widgets.Layout(width="300px"))
    display(config_db)
    config_username = widgets.Text(description='Username:', value='EC582F955C8A79F70A49420E@AdobeOrg',
                                layout=widgets.Layout(width="600px"))
    display(config_username)
    config_password = widgets.Password(description='Password:', value='***',
                                    layout=widgets.Layout(width="600px"))
    display(config_password)
    
  8. Execute the cell.

  9. Use Copy to copy and paste the password from the Experience Platform Query Expiring Credentials panel to the Password field in Jupyter Notebook.

    Jupter Notebook Config Step 1 {modal="regular"}

  10. In a new cell, enter the statements to load the SQL extension, the required library and connect with Customer Journey Analytics.

    code language-python
    %load_ext sql
    from sqlalchemy import create_engine
    %sql postgresql://{config_username.value}:{config_password.value}@{config_host.value}:{config_port.value}/{config_db.value}?sslmode=require
    

    Execute the shell. You should see no output but the cell should execute without any warning.

    Jupyer Notebook Config Step 4 {modal="regular"}

  11. In a new call, enter the statements to get a list of available data views based on the connection.

    code language-python
    %%sql
    SELECT n.nspname as "Schema",
       c.relname as "Name",
       CASE c.relkind WHEN 'r' THEN 'table' WHEN 'v' THEN 'view' WHEN 'm' THEN 'materialized view' WHEN 'i' THEN 'index' WHEN 'S' THEN 'sequence' WHEN 's' THEN 'special' WHEN 't' THEN 'TOAST table' WHEN 'f' THEN 'foreign table' WHEN 'p' THEN 'partitioned table' WHEN 'I' THEN 'partitioned index' END as "Type",
       pg_catalog.pg_get_userbyid(c.relowner) as "Owner"
    FROM pg_catalog.pg_class c
    LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace
    WHERE c.relkind IN ('v','')
       AND n.nspname <> 'pg_catalog'
       AND n.nspname !~ '^pg_toast'
       AND n.nspname <> 'information_schema'
       AND pg_catalog.pg_table_is_visible(c.oid)
       AND c.relname NOT LIKE '%test%'
       AND c.relname NOT LIKE '%ajo%'
    ORDER BY 1,2;
    

    Execute the shell. You should see output simular to the screenshot below.

    Jupyter Notebook Config Step 5 {modal="regular"}

    You should see the cc_data_view in the list of data views.

To FLATTEN or not

Jupyter Notebook supports the following scenarios for the FLATTEN parameter. See Flatten nested data for more information.

table 0-row-4 1-row-4 2-row-4 3-row-4 3-align-center 8-align-center 13-align-center 18-align-center
FLATTEN parameter Example Supported Remarks
None prod:cja CheckmarkCircle
?FLATTEN prod:cja?FLATTEN CloseCircle
%3FFLATTEN prod:cja%3FFLATTEN CheckmarkCircle Recommended option to use. Note, %3FFLATTEN is URL-encoded version of ?FLATTEN.

More information

RStudio
  1. Access the required credentials and parameters from the Experience Platform Query Service UI.

    1. Navigate to your Experience Platform sandbox.

    2. Select Queries Queries from the left rail.

    3. Select Credentials tab in the Queries interface.

    4. Select prod:cja from the Database dropdown menu.

      Query service credentials {modal="regular"}

  2. Start RStudio.

  3. Create a new R Markdown file, or download this example R markdown file.

  4. In your first chunk, enter the following statements between ```{r} and ```. Use Copy to copy and paste values from the Experience Platform Query Expiring Credentials panel to the values required for the various parameters, like host, dbname, and user. For example:

    code language-r
    library(rstudioapi)
    library(DBI)
    library(dplyr)
    library(tidyr)
    library(RPostgres)
    library(ggplot2)
    
    host <- rstudioapi::showPrompt(title = "Host", message = "Host", default = "orangestagingco.platform-query-stage.adobe.io")
    dbname <- rstudioapi::showPrompt(title = "Database", message = "Database", default = "prod:cja?FLATTEN")
    user <- rstudioapi::showPrompt(title = "Username", message = "Username", default = "EC582F955C8A79F70A49420E@AdobeOrg")
    password <- rstudioapi::askForPassword(prompt = "Password")
    
  5. Run the chunk. You are prompted for Host, Database, and User. Simply accept the values you have provided as part of the previous step.

  6. Use Copy to copy and paste the password from the Experience Platform Query Expiring Credentials panel to the Password dialog prompt in RStudio.

    RStudio config step 1 {modal="regular"}

  7. Create a new chunk and enter the following statements between ``` {r} and ```.

    code language-r
    con <- dbConnect(
       RPostgres::Postgres(),
       host = host,
       port = 80,
       dbname = dbname,
       user = user,
       password = password,
       sslmode = 'require'
    )
    
  8. Run the chunk. You should see no output if the connection is successful.

  9. Create a new chunk and enter the following statements between ``` {r} and ```.

    code language-r
    views <- dbListTables(con)
    print(views)
    
  10. Run the chunk. You should see character(0) as the only output.

  11. Create a new chunk and enter the following statements between ``` {r} and ```.

    code language-r
    glimpse(dv)
    
  12. Run the chunk. You should see output simular to the screenshot below.

    RStudio config step 2 {modal="regular"}

To FLATTEN or not

RStudio supports the following scenarios for the FLATTEN parameter. See Flatten nested data for more information.

table 0-row-4 1-row-4 2-row-4 3-row-4 3-align-center 8-align-center 13-align-center 18-align-center
FLATTEN parameter Example Supported Remarks
None prod:cja CheckmarkCircle
?FLATTEN prod:cja?FLATTEN CheckmarkCircle Recommended option to use.
%3FFLATTEN prod:cja%3FFLATTEN CloseCircle

More information

Daily trend

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.

Customer Journey Analytics

An example Daily Trend panel for the use case:

Customer Journey Analytics Daily Trend panel {modal="regular"}

BI tools
note prerequisites
PREREQUISITES
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.
tabs
Power BI Desktop
  1. In the Data pane:

    1. Select daterangeday.
    2. Select βˆ‘ occurrences.

    You see a table displaying the occurrences for the current month. For better visibility, enlarge the visualization.

  2. In the Filters pane:

    1. Select the daterangeday is (All) from Filters on this visual.
    2. Select Advanced filtering as the Filter type.
    3. Define the filter to Show items when the value is on or after 1/1/2023 And is before 2/1/2023. You can use the calendar icon to pick and select dates.
    4. Select Apply filter.

    You see the table updated with the applied daterangeday filter.

  3. 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.

    Power BI Desktop Use Case 2 Date range filter {modal="regular"}

  4. On the Line chart visualization:

    1. Select More .
    2. From the context menu, select Show as a table.

    The main view is updated to show both a line visualization and a table. Your Power BI Desktop should look like below.

    Power BI Desktop Use Case 2 Final Daily Trend visualization {modal="regular"}

Tableau Desktop
  1. Select the Sheet 1 tab at the bottom to switch from the Data source view. In the Sheet 1 view:

    1. Drag the Daterange entry from the Tables list in the Data pane and drop the entry onto the Filters shelf.

    2. In the Filters Field [Daterange] dialog, select Range of Dates and select Next >.

    3. In the Filter [Daterange] dialog, select Range of dates and specify a period of 01/01/2023 - 01/02/2023.

      Tableau Desktop Filter {modal="regular"}

    4. Drag and drop Daterangeday from the Tables list in the Data pane and drop the entry in the field next to Columns.

      • Select Day from the Daterangeday dropdown menu, so that the value is updated to DAY(Daterangeday).
    5. 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).

    6. Modify Standard to Entire View from the Fit dropdown menu in the toolbar.

      Your Tableau Desktop should look like below.

      Tableau Desktop Graph {modal="regular"}

  2. Select Duplicate from the Sheet 1 tab context menu to create a second sheet.

  3. Select Rename from the Sheet 1 tab context menu to rename the sheet to Graph.

  4. Select Rename from the Sheet 1 (2) tab context menu to rename the sheet to Data.

  5. Ensure that the Data sheet is selected. In the Data view:

    1. 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.

    2. Select Swap Rows and Columns from the toolbar.

    3. Modify Standard to Entire View from the Fit dropdown menu in the toolbar.

      Your Tableau Desktop should look like below.

      Tableau Desktop Data {modal="regular"}

  6. Select the New Dashboard tab button (at the bottom) to create a new Dashboard 1 view. In the Dashboard 1 view:

    1. Drag and drop the Graph sheet from the Sheets shelf onto the Dashboard 1 view that reads Drop sheets here.

    2. Drag and drop the Data sheet from the Sheets shelf below the Graph sheet onto the Dashboard 1 view.

    3. Select the Data sheet in the view and modify Entire View to Fix Width.

      Your Tableau Desktop should look like below.

      Tableau Desktop Dashboard 1 {modal="regular"}

Looker
  1. In the Explore interface of Looker, ensure you do have a clean setup. If not, select Setting Remove fields and filters.

  2. Select + Filter underneath Filters.

  3. In the Add Filter dialog:

    1. Select β€£ Cc Data View

    2. From the list of fields, select β€£ Daterange Date then Daterange Date.

      Looker filter {modal="regular"}

  4. Specify the Cc Data View Daterange Date filter as is in range 2023/01/01 until (before) 2023/02/01.

  5. From the Cc Data View section in the left rail,

    1. Select β€£ Daterange Date, then Date from the list of DIMENSIONS.
    2. Select Count underneath MEASURES in the left rail (at the bottom).
  6. Select Run.

  7. Select β€£ Visualization to display the line visualization.

You should see a visualization and table similar as shown below.

Looker result daily trend {modal="regular"}

Jupyter Notebook
  1. Enter the following statements in a new cell.

    code language-python
    import seaborn as sns
    import matplotlib.pyplot as plt
    data = %sql SELECT daterangeday AS Date, COUNT(*) AS Events \
              FROM cc_data_view \
              WHERE daterange BETWEEN '2023-01-01' AND '2023-02-01' \
              GROUP BY 1 \
              ORDER BY Date ASC
    df = data.DataFrame()
    df = df.groupby('Date', as_index=False).sum()
    plt.figure(figsize=(15, 3))
    sns.lineplot(x='Date', y='Events', data=df)
    plt.show()
    display(data)
    
  2. Execute the cell. You should see output similar to the screenshot below.

    Jupyter Notebook Results {modal="regular"}

RStudio
  1. Enter the following statements between ```{r} and ``` in a new chunk.

    code language-r
    ## Daily Events
    df <- dv %>%
       filter(daterange >= "2023-01-01" & daterange < "2023-02-01") %>%
       group_by(daterangeday) %>%
       count() %>%
       arrange(daterangeday, .by_group = FALSE)
    ggplot(df, aes(x = daterangeday, y = n)) +
       geom_line(color = "#69b3a2") +
       ylab("Events") +
       xlab("Date")
    print(df)
    
  2. Run the chunk. You should see output similar to the screenshot below.

    RStudio Results {modal="regular"}

Hourly trend

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.

Customer Journey Analytics

An example Hourly Trend panel for the use case:

Customer Journey Analytics Hourly Trend visualizations {modal="regular"}

BI tools
note prerequisites
PREREQUISITES
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.
tabs
Power BI Desktop AlertRed Power BI does not understand how to handle date-time fields, so dimensions like daterangehour and daterangeminute are not supported.
Tableau Desktop
  1. Select the Sheet 1 tab at the bottom to switch from Data source. In the Sheet 1 view:

    1. Drag the Daterange entry from the Tables list in the Data pane and drop the entry onto the Filters shelf.

    2. In the Filters Field [Daterange] dialog, select Range of Dates and select Next >.

    3. In the Filter [Daterange] dialog, select Range of dates and specify a period of 01/01/2023 - 02/01/2023.

      Tableau Desktop Filter {modal="regular"}

    4. Drag and drop Daterangehour from the Tables list in the Data pane and drop the entry in the field next to Columns.

      • Select More > Hours from the Daterangeday dropdown menu, so that the value is updated to HOUR(Daterangeday).
    5. 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).

    6. Modify Standard to Entire View from the Fit dropdown menu in the toolbar.

      Your Tableau Desktop should look like below.

      Tableau Desktop Graph {modal="regular"}

  2. Select Duplicate from the Sheet 1 tab context menu to create a second sheet.

  3. Select Rename from the Sheet 1 tab context menu to rename the sheet to Graph.

  4. Select Rename from the Sheet 1 (2) tab context menu to rename the sheet to Data.

  5. Ensure that the Data sheet is selected. In the Data view:

    1. 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.

    2. Drag HOUR(Daterangeday) from Columns to Rows.

    3. Modify Standard to Entire View from the Fit dropdown menu in the toolbar.

      Your Tableau Desktop should look like below.

      Tableau Desktop Data {modal="regular"}

  6. Select New Dashboard tab button (at the bottom) to create a new Dashboard 1 view. In the Dashboard 1 view:

    1. Drag and drop the Graph sheet from the Sheets shelf onto the Dashboard 1 view that reads Drop sheets here.

    2. Drag and drop the Data sheet from the Sheets shelf below the Graph sheet onto the Dashboard 1 view.

    3. Select the Data sheet in the view and modify Entire View to Fix Width.

      Your Dashboard 1 view should look like below.

      Tableau Desktop Dashboard 1 {modal="regular"}

Looker
  1. In the Explore interface of Looker, ensure you do have a clean setup. If not, select Setting Remove fields and filters.

  2. Select + Filter underneath Filters.

  3. In the Add Filter dialog:

    1. Select β€£ Cc Data View

    2. From the list of fields, select β€£ Daterange Date then Daterange Date.

      Looker filter {modal="regular"}

  4. Specify the Cc Data View Daterange Date filter as is in range 2023/01/01 until (before) 2023/01/02.

  5. From the Cc Data View section in the left rail,

    1. Select β€£ Daterangehour Date, then Time from the list of DIMENSIONS.
    2. Select Count underneath MEASURES in the left rail (at the bottom).
  6. Select Run.

  7. Select β€£ Visualization to display the line visualization.

You should see a visualization and table similar as shown below.

Looker result daily trend {modal="regular"}

Jupyter Notebook
  1. Enter the following statements in a new cell.

    code language-python
    import seaborn as sns
    import matplotlib.pyplot as plt
    data = %sql SELECT daterangehour AS Hour, COUNT(*) AS Events \
                FROM cc_data_view \
                WHERE daterange BETWEEN '2023-01-01' AND '2023-01-02' \
                GROUP BY 1 \
                 ORDER BY Hour ASC
    df = data.DataFrame()
    df = df.groupby('Hour', as_index=False).sum()
    plt.figure(figsize=(15, 3))
    sns.lineplot(x='Hour', y='Events', data=df)
    plt.show()
    display(data)
    
  2. Execute the cell. You should see output similar to the screenshot below.

    Jupyter Notebook Results {modal="regular"}

RStudio
  1. Enter the following statements between ```{r} and ``` in a new chunk.

    code language-r
    ## Hourly Events
    df <- dv %>%
       filter(daterange >= "2023-01-01" & daterange < "2023-01-02") %>%
       group_by(daterangehour) %>%
       count() %>%
       arrange(daterangehour, .by_group = FALSE)
    ggplot(df, aes(x = daterangehour, y = n)) +
       geom_line(color = "#69b3a2") +
       ylab("Events") +
       xlab("Hour")
    print(df)
    
  2. Run the chunk. You should see output similar to the screenshot below.

    RStudio Results {modal="regular"}

Monthly trend

In this use case, you want to display a table and simple line visualization that shows a monthly trend of occurrence (events) for 2023.

Customer Journey Analytics

An example Monthly Trend panel for the use case:

Customer Journey Analytics Monthly Trend visualization {modal="regular"}

BI tools
note prerequisites
PREREQUISITES
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.
tabs
Power BI Desktop
  1. In the Data pane:

    1. Select daterangemonth.
    2. Select βˆ‘ occurrences.

    You see a table displaying the occurrences for the current month. For better visibility, enlarge the visualization.

  2. In the Filters pane:

    1. Select the daterangemonth is (All) from Filters on this visual.
    2. Select Advanced filtering as the Filter type.
    3. Define the filter to Show items when the value is on or after 1/1/2023 And is before 1/1/2024. You can use the calendar icon to pick and select dates.
    4. Select Apply filter.

    You see the table updated with the applied daterangemonth filter.

  3. In the Visualizations pane:

    1. 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.

    Power BI Desktop Use Case 2 Date range filter {modal="regular"}

  4. On the Line chart visualization:

    1. Select More .
    2. From the context menu, select Show as a table.

    The main view is updated to show both a line visualization and a table. Your Power BI Desktop should look like below.

    Power BI Desktop Use Case 2 Final Daily Trend visualization {modal="regular"}

Tableau Desktop
  1. Select the Sheet 1 tab at the bottom to switch from Data source. In the Sheet 1 view:

    1. Drag the Daterange entry from the Tables list in the Data pane and drop the entry onto the Filters shelf.

    2. In the Filters Field [Daterange] dialog, select Range of Dates and select Next >.

    3. In the Filter [Daterange] dialog, select Range of dates and specify a period of 01/01/2023 - 01/01/2024.

      Tableau Desktop Filter {modal="regular"}

    4. Drag and drop Daterangeday from the Tables list in the Data pane and drop the entry in the field next to Columns.

      • Select MONTH from the Daterangeday dropdown menu, so that the value is updated to MONTH(Daterangeday).
    5. 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).

    6. Modify Standard to Entire View from the Fit dropdown menu in the toolbar.

      Your Tableau Desktop should look like below.

      Tableau Desktop Graph {modal="regular"}

  2. Select Duplicate from the Sheet 1 tab context menu to create a second sheet.

  3. Select Rename from the Sheet 1 tab context menu to rename the sheet to Graph.

  4. Select Rename from the Sheet 1 (2) tab context menu to rename the sheet to Data.

  5. Ensure that the Data sheet is selected. In the Data view:

    1. 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.

    2. Drag MONTH(Daterangeday) from Columns to Rows.

    3. Modify Standard to Entire View from the Fit dropdown menu in the toolbar.

      Your Tableau Desktop should look like below.

      Tableau Desktop Data {modal="regular"}

  6. Select New Dashboard tab button (at the bottom) to create a new Dashboard 1 view. In the Dashboard 1 view:

    1. Drag and drop the Graph sheet from the Sheets shelf onto the Dashboard 1 view that reads Drop sheets here.

    2. Drag and drop the Data sheet from the Sheets shelf below the Graph sheet onto the Dashboard 1 view.

    3. Select the Data sheet in the view and modify Entire View to Fix Width.

      Your Tableau Desktop should look like below.

      Tableau Desktop Dashboard 1 {modal="regular"}

Looker
  1. In the Explore interface of Looker, ensure you do have a clean setup. If not, select Setting Remove fields and filters.

  2. Select + Filter underneath Filters.

  3. In the Add Filter dialog:

    1. Select β€£ Cc Data View

    2. From the list of fields, select β€£ Daterange Date then Daterange Date.

      Looker filter {modal="regular"}

  4. Specify the Cc Data View Daterange Date filter as is in range 2023/01/01 until (before) 2024/01/01.

  5. From the left Cc Data View rail,

    1. Select β€£ Daterangemonth Date, then Month from the list of DIMENSIONS.
    2. Select Count underneath MEASURES in the left rail (at the bottom).
  6. Select Run.

  7. Select β€£ Visualization to display the line visualization.

You should see a visualization and table similar as shown below.

Looker result daily trend {modal="regular"}

Jupyter Notebook
  1. Enter the following statements in a new cell.

    code language-python
    import seaborn as sns
    import matplotlib.pyplot as plt
    data = %sql SELECT daterangemonth AS Month, COUNT(*) AS Events \
                FROM cc_data_view \
                WHERE daterange BETWEEN '2023-01-01' AND '2024-01-01' \
                GROUP BY 1 \
                ORDER BY Month ASC
    df = data.DataFrame()
    df = df.groupby('Month', as_index=False).sum()
    plt.figure(figsize=(15, 3))
    sns.lineplot(x='Month', y='Events', data=df)
    plt.show()
    display(data)
    
  2. Execute the cell. You should see output similar to the screenshot below.

    Jupyter Notebook Results {modal="regular"}

RStudio
  1. Enter the following statements between ```{r} and ``` in a new chunk.

    code language-r
    ## Hourly Events
    df <- dv %>%
       filter(daterange >= "2023-01-01" & daterange < "2023-01-02") %>%
       group_by(daterangehour) %>%
       count() %>%
       arrange(daterangehour, .by_group = FALSE)
    ggplot(df, aes(x = daterangehour, y = n)) +
       geom_line(color = "#69b3a2") +
       ylab("Events") +
       xlab("Hour")
    print(df)
    
  2. Run the chunk. You should see output similar to the screenshot below.

    RStudio Results {modal="regular"}

Single dimension ranked

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.

Customer Journey Analytics

An example Single Dimension Ranked panel for the use case:

Customer Journey Analytics Single dimension ranked visualization {modal="regular"}

080e5213-7aa2-40d6-9dba-18945e892f79