Chord Commerce Data Platform
Dashboards and Looks

Creating Custom Fields

2min

ο»Ώ

Introduction

You can create new ad hoc custom dimensions and measures in Explore using custom fields. This page discusses creating and using custom fields to enhance your data analysis.

ο»Ώ

Learning the ins and outs of looker has never been easier with the free and introductory tool from Google Cloud. ο»Ώ

What are Custom fields?

Looker allows you to create and utilize ad hoc fields for richer data analysis. This is done by creating custom measures, dimensions, and table calculations and using custom groupings to narrow down data to match specific conditions.

ο»Ώ

The default timezone in Looker for OMS timestamps is UTC, whereas the OMS UI displays EST.

Within Looker, we've added additional timezone options for some of our timestamps but not for Order Approved Date. Custom time zones can be created with a custom field and can be submitted as a feature request.

Filtering with a Custom field

ο»Ώ

Suppose we retrieve all orders created on the 10th of each month this current year and see the associated order numbers and created date.

Click on Explore --> Orders, expand the Filters section, and click the Custom checkbox in the upper right.

ο»Ώ

Custom Filter
Custom Filter
ο»Ώ

ο»Ώ

When you start typing, Looker prompts you with operators, functions, and field names that you might want to use in your filters business logic. You can also see that when you hover over the function you are typing, Looker will tell what these functions, operators, and field names do.

ο»Ώ

Custom Filter functions
Custom Filter functions
ο»Ώ

ο»Ώ

Type in extract_days(${x_fct_trans_orders.order_created_at_date}) = 10

Click on Visualization and click Columns

On the Explore click Order Number to include it to your report along with any Order Created Date

Click on Order Created Date again and click Filter By field icon

ο»Ώ

Order Number
Order Number
ο»Ώ

ο»Ώ

ο»Ώ

ο»Ώ

ο»Ώ

Order Created Date
Order Created Date
ο»Ώ

ο»Ώ

Click Run

You can see all created orders on the 10th of each month for this current year

ο»Ώ

ο»Ώ

Orders created every 10th of the month
Orders created every 10th of the month
ο»Ώ

ο»Ώ

ο»Ώ

This document will further describe the functions available

You can also add the custom filters to your custom field

Click Custom Fields and click Add

ο»Ώ

ο»Ώ

Add Custom Fields
Add Custom Fields
ο»Ώ

ο»Ώ

Select Dimension and paste the function used above extract_days(${x_fct_trans_orders.order_created_at_date}) = 10

Provide the Custom Dimension a Name and click Save

ο»Ώ

You've just created and saved a custom dimension field!

ο»Ώ

ο»Ώ

What are Measure and Dimension fields?

You can use Dimensions to categorize, segment, and reveal the details in your data. Dimensions affect the level of detail in the view. Measures contain numeric, quantitative values that you can measure. Dimensions include qualitative values (names, dates, or geographical data).

AΒ measureΒ is a field that can be aggregated in some way, such as a sum or an average. Think of it as something that can be collected, counted, or combined in some way to return a single value

ο»Ώ

We saw above an example of a Custom Dimension with retrieving Orders every 10th of the month. An example of a Measure would be if you wanted to know the average count of Product in your customers' cart

ο»Ώ

Custom Measure
Custom Measure
ο»Ώ

ο»Ώ

For more information about Custom fields and Measure Vs Dimension fields please refer to Looker documentation ο»Ώ

ο»Ώ

ο»Ώ

if you have any questions or need help, please reach out to us at [email protected]ο»Ώ

ο»Ώ

ο»Ώ

ο»Ώ