# Creating Metric Visualizations with the Time Series Visual Builder (TSVB) in Kibana 7.6

1 hour
• 3 Learning Objectives

The TSVB is a powerful tool when creating visualizations from time series data. By using the TSVB to create metric visualizations, we can leverage the customizability of the interface to visually communicate our data in a highly readable way. In this hands-on lab, we will use the TSVB to create metric visualizations in Kibana.

## Learning Objectives

Successfully complete this lab by achieving the following learning objectives:

Create and Save the Products Visualization
1. Create a new metric visualization with the TSVB.
2. Calculate the cardinality of `products.manufacturer.keyword` and label it as Manufacturers.
3. Calculate the cardinality of `products.product_name.keyword` and label it as Products.
4. Configure the visualization to show the latest value with daily intervals and do not drop the last bucket.
5. Save the visualization as "Products".
Create and Save the Items Sold Visualization
1. Create a new metric visualization with the TSVB.
2. Calculate the count of events and label it as Orders.
3. Calculate the sum of `products.quantity` and label it as Items Sold.
4. Configure the visualization to show the latest value with daily intervals and do not drop the last bucket.
5. Save the visualization as "Items Sold".
Create and Save the Sales Visualization
1. Create a new metric visualization with the TSVB.
2. Calculate the sum of `products.price` and label it as Sales.
3. Configure Sales to display as a dollar amount with 2 decimal places (example: 1,234.567 as \$1,234.56).
4. Configure the visualization to show the latest value with daily intervals and do not drop the last bucket.
5. Calculate the sum of `products.price` and label it as Year to Date.
6. Configure Year to Date to display as a dollar amount with 2 decimal places (example: 1,234.567 as \$1,234.56).
7. Configure Year to Date to show the latest value with yearly intervals and do not drop the last bucket.
8. Save the visualization as "Sales".

You work as a data analyst for an online clothing store. You have been tasked with creating the following TSVB metric visualizations in Kibana to track daily sales metrics:

Products

• Calculate the cardinality of `products.manufacturer.keyword` and label it as Manufacturers.
• Calculate the cardinality of `products.product_name.keyword` and label it as Products.
• Configure the visualization to show the latest value with daily intervals and do not drop the last bucket.

Items Sold

• Calculate the sum of `products.quantity` and label it as Items Sold.
• Calculate the sum of `products.quantity` with a 1 day offset and label it as Yesterday.
• Configure the visualization to show the latest value with daily intervals and do not drop the last bucket.

Sales

• Calculate the sum of `products.price` and label it as Sales.
• Configure Sales to display as a dollar amount with 2 decimal places (example: 1,234.567 as \$1,234.56).
• Configure the visualization to show the latest value with daily intervals and do not drop the last bucket.
• Calculate the sum of `products.price` and label it as Year to Date.
• Configure Year to Date to display as a dollar amount with 2 decimal places (example: 1,234.567 as \$1,234.56).
• Configure Year to Date to show the latest value with yearly intervals and do not drop the last bucket.

Your lab node node has an Kibana instance which can be accessed in your local web browser by navigating to the public IP address of the lab node over port 8080 (example: `http://public_ip:8080`). To log in, use the elastic user with the password elastic_acg.

## What are Hands-on Labs

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Welcome Back!

Psst…this one if you’ve been moved to ACG!

Get Started
Who’s going to be learning?