Custom fields in Tableau: Add calculations to tables through custom fields
365 Data Science
š Download Our Free Data Science Career Guide:ā https://bit.ly/2PPMqjd š Sign up for Our Complete Data Science Training:ā https://bit.ly/340Nx7K In this tutorial, we will show you how you can add calculations to tables through custom fields in Tableau.
Right now, the table weāve created shows us the number of units sold by the firm in each month of 2016 and 2017. Letās change this measure. What I would like it to show us is the revenue the company generated during each of these periods. How can I do that? Well, itās fairly easy. Our source data contains information about price and Tableau counted the number of units sold (each row shows us a single car sale, right?). Therefore, if we multiply the āPriceā field and the auto-generated āNumber of recordsā field, we would obtain Revenues. We already know how to create a calculated field. Iāll name it āRevenueā, and will take advantage of Tableauās auto-complete suggestions multiplying āPriceā and āNumber of recordsā. We can use the āstarā operator to carry out a multiplication. One very useful feature you have probably noticed, is that at the bottom of the screen Tableau tells us whether the calculation weāve entered is a valid one or not. Right now, my calculation is valid. If I remove a few symbols, Tableau would indicate that the calculation contains errors. This is a good guiding light when we create a calculation. Right, so this is our āRevenueā field. We can easily substitute the ānumber of recordsā data in the table with it. All I have to do is drag the āRevenue fieldā and position it over the ānumber of records dataā. Tableau replaces the two fields. An important metric contained in our source data is āGross Profitā. By definition, āRevenueā minus āCogsā equals āGross Profitā. Currently, we have ārevenueā and āgross profitā. Letās calculate āCogsā as the difference between the two. Nice. Letās order our table in the following way. First, weāll have Revenue, then Cogs, and finally Gross Profit.
Follow us on YouTube: https://www.youtube.com/c/365DataScience
Connect with us on our social media platforms: Website: https://bit.ly/3cfr5Ja Facebook: https://www.facebook.com/365datascience Instagram: https://www.instagram.com/365datascience Q&A Hub: https://365datascience.com/qa-hub/ LinkedIn: https://www.linkedin.com/company/365datascience
Prepare yourself for a career in data science with our comprehensive program: https://bit.ly/2yfBaH5
Get in touch about the training at: support@365datascience.com
Comment, like, share, and subscribe! We will be happy to hear from you and will get back to you! #tableau #fields #datascience #tutorial #statistics #spreasheets
6852026 Bytes