Create metrics for measures that don’t exist in the Tableau data source
top of page
  • Bernard K

Create metrics for measures that don’t exist in the Tableau data source

how to create metrics for measures that don't exist in the tableau data source

Introduction

In the previous article, I explained how to create metrics in Tableau Pulse. In this article, I want to explore this discussion further by demonstrating how metrics can be created for measures that don’t exist in the data source. I will be using the Sample-Superstore data for the year 2024 which is already published in my Tableau cloud. In case you missed out on the previous article check it in the link below.

Creating a metric tracking Profit Ratio

Profit Ratio is a financial ratio that measures the percentage of profit earned by a business in relation to its revenue. In the context of, the sample-superstore data source – Profit Ratio would be computed as follows.

Profit Ratio=SUM(Profit)/SUM(Sales)*100%

Looking at the data we are working on, the measure field Profit Ratio does not exist, however the measure Profit and Sales exists – meaning to track this metric we can create it using the available fields as follows.

On the Tableau Pulse homepage select create New Metric Definition.

tableau pulse home page

Next, connect the data source and name your metric - in this case ‘Profit Ratio’.

connect data source and name your metric

Next under Value section - select Create Advanced Definition, which pops a window similar to Tableau Desktop interface – with measures and dimensions.

create advanced definitions for metrics that don't exist in the tableau data source

On the new window, you can create a calculated field to compute Profit Ratio as shown below.

a simple calculated field computing profit ratio

Next, drag the calculated field ‘Profit Ratio’ to the Measure, and Order Date to the Time Dimension. Click Apply.

set metric definition

Under the Number format section, format your metric to percentage as shown below.

formatting metric in tableau cloud

Add adjustable metric filters and save your metric definition.

adding adjustable metric filters

With the metric now set, you can follow it and invite others to follow.

follow your metric and share with others

Conclusion

Tableau Pulse metrics allows you to integrate data in your daily workflow – and without the need to learn or build new visualizations, it helps you go beyond the how and what and shows you the why behind your data.

I hope this article was helpful to you. If you wish to receive more Tableau tips and tricks, kindly join our mailing list by subscribing below.

If you like the work we do and would like to work with us, drop us an email on our contacts page and we’ll reach out!

Thank you for reading!

Blog.png
Black & white.jpg

About Me

More About the Author

Bernard K

Analytics Consultant | 3X Tableau Certified

Bernard is a data analytics consultant helping businesses reveal the true power of their data and bring clarity to their reporting dashboards. He loves building things and sharing knowledge on how to build dashboards that drive better outcomes.

Let’s discuss your data challenges! Let’s work together!

bottom of page