Tutorial: Create a dashboard of panels with ecommerce sales data

edit

Tutorial: Create a dashboard of panels with ecommerce sales data

edit

You collected sales data from your store, and you want to visualize and analyze the data on a dashboard. To create dashboard panels of the data, open the Lens visualization builder, then create the visualization panels that best display the data.

When you’ve completed the tutorial, you’ll have a dashboard that provides you with a complete overview of your ecommerce sales data.

Dashboard view

Add the data and create the dashboard

edit

To create visualizations of the data from your store, add the data set, then create the dashboard.

  1. From the Kibana Home page, click Try our sample data.
  2. From Sample eCommerce orders, click Add data.
  3. Open the main menu, then click Dashboard.
  4. On the Dashboards page, click Create dashboard.

Open and set up Lens

edit

Open the Lens editor, then make sure the correct fields appear.

  1. From the dashboard, click Create panel.
  2. On the New visualization window, click Lens.

    New visualization popover
  3. Make sure the kibana_sample_data_ecommerce_ index appears.

View the number of transactions per hour

edit

To determine the number of orders made every hour, create a bar chart, then add the chart to the dashboard.

  1. Set the time filter to Last 30 days.
  2. From the Available fields list, drag and drop Records to the visualization builder.

    Added records to the workspace
  3. Change the Vertical axis title and display the number of orders per day.

    1. In the editor, click Count of Records.
    2. In the Display name field, enter Number of orders.
    3. Click Add advanced options > Normalize by unit.
    4. From the Normalize by unit dropdown, select per hour, then click Close.
  4. To hide the Horizontal axis label, open the Bottom Axis menu, then deselect Show.

    Bottom axis menu

    You have a bar chart that shows you how many orders were made at your store every hour.

    Orders per day
  5. Click Save and return.

View the cumulative number of products sold on weekends

edit

To determine the number of orders made only on Saturday and Sunday, create an area chart, then add it to the dashboard.

  1. Open Lens.
  2. From the Chart Type dropdown, select Area.

    Chart type menu with Area selected
  3. Configure the cumulative sum of the store orders.

    1. From the Available fields list, drag and drop Records to the visualization builder.
    2. From the editor, click Count of Records.
    3. From Select a function, click Cumulative sum.
    4. In the Display name field, enter Cumulative orders during weekend days, then click Close.
  4. Filter the results to display the data for only Saturday and Sunday.

    1. From the editor, click the Drop a field or click to add field for Break down by.
    2. From Select a function, click Filters.
    3. Click All records.
    4. In the KQL field, enter day_of_week : "Saturday" or day_of_week : "Sunday", then press Return.

      The KQL filter displays all documents where day_of_week matches Saturday or Sunday.

      Filter aggregation to filter weekend days
  5. To hide the legend, open the Legend menu, then click Hide.

    Legend menu

    You have an area chart that shows you how many orders your store received during the weekend.

    Line chart with cumulative sum of orders made on the weekend
  6. Click Save and return.

Create multiple key percentiles of product prices

edit

To view the price distribution of products sold over time, create a percentile chart, then add it to the dashboard.

  1. Open Lens.
  2. From the Chart Type dropdown, select Line.
  3. From the Available fields list, drag and drop the data fields to the Drop a field or click to add fields in the editor.

    • Drag and drop products.price to the Vertical axis field.
    • Drag and drop order_date to the Horizontal axis field.
  4. Create the 95th percentile.

    1. In the editor, click Median of products.price.
    2. From Select a function, click Percentile.
    3. In the Display name field, enter 95th, then click Close.
  5. To create the 90th percentile, duplicate the 95th percentile.

    1. Drag and drop 95th to Drop a field or click to add.
    2. Click 95th [1], then enter 90 in the Percentile field.
    3. In the Display name field enter 90th, then click Close.

      Easily duplicate the items with drag and drop
  6. Create the 50th percentile.

    1. Drag and drop 90th to Drop a field or click to add.
    2. Click 90th [1], then enter 50 in the Percentile field.
    3. In the Display name field enter 50th, then click Close.
  7. Create the 10th percentile.

    1. Drag and drop 50th to Drop a field or click to add.
    2. Click 50th [1], then enter 10 in the Percentile field.
    3. In the Display name field enter 10th, then click Close.
  8. To change the left axis label, open the Left Axis menu, then enter Percentiles for product prices in the Axis name field.

    Left Axis menu

    You have a line chart that shows you the price distribution of products sold over time.

    Percentiles for product prices chart
  9. Click Save and return.

View the moving average of inventory prices

edit

To view and analyze the prices of shoes, accessories, and clothing in the store inventory, create a line chart.

  1. Open Lens.
  2. From the Chart Type dropdown, select Line.
  3. From the Available fields list, drag and drop products.price to the visualization builder.
  4. In the editor, click the Drop a field or click to add field for Break down by.
  5. From Select a function, click Filters.
  6. Add a filter for shoes.

    1. Click All records.
    2. In the KQL field, enter category.keyword : *Shoes*.
    3. In the Label field, enter Shoes, then press Return.
  7. Add a filter for accessories.

    1. Click Add a filter.
    2. In the KQL field, enter category.keyword : *Accessories*.
    3. In the Label field, enter Accessories, then press Return.
  8. Add a filter for clothing.

    1. Click Add a filter.
    2. In the KQL field, enter category.keyword : *Clothing*.
    3. In the Label field, enter Clothing, then press Return.
  9. Click Close

    Median prices chart for different categories

Add the moving average

edit

To focus on the general trends rather than on the peaks in the data, add the moving average, then add the visualization to the dashboard.

  1. In the editor, click the Median of products.price.
  2. From Select a function, click Moving average.
  3. In the Window size field, enter 7, then click Close.

    Moving average prices chart for different categories
  4. Click Save and return.

Save the dashboard

edit

Now that you have a complete overview of your ecommerce sales data, save the dashboard.

  1. In the toolbar, click Save.
  2. On the Save dashboard window, enter Ecommerce sales data, then click Save.