Create A Calculated Field

data science tableau calculated field

I have just enrolled in a Data Science course on Udemy  and I learned good stuff.

Now is the time to solve the problem of who is winning the bonus.

The first thing to do is clean the dashboard. To do this, click on the « Clear Sheet » button.

data science tableau calculated field

To start we need to create a « Bar Chart » to see the salesperson. In this data, salesperson named « Rep » for representatives.

data science tableau calculated field

To see how many items were sold by each sales representative, you need to put « Rep » in « Columns » and « Units » in « Rows ».

data science tableau calculated field

You can see that the representative who sold the most is Richard.

But we want to have more details. We need to know who is the best representative by region and for now, we can’t see that.

To see this, you put « Region » in « Columns » before « Rep ».

data science tableau calculated field

As you can see, the « Bar Chart » changed. There are separations by region.

In each region, you can see the representatives and the number of items they sold. Alex is the best in Central. Richard is the best in the East and James is the best in West.

To get better visibility, you can order the bars in descending order. Move the mouse over the label « Units » of the bar chart and an icon will apprear. Click on it and the bars will be sorted in descending order.

data science tableau calculated field

Unfortunately, we didn’t answer the question because « Units » is only the number of items sold. What interests us is the amount of money earned by selling the product but we don’t have this type of measure. There is no measure that shows us the total value of sales. There are only « Units » and « Units Price ».

In this case, you have to make a calculation to have the total sales in cash. For each representative, you need to multiply « Units » with « Units Price ».

Let’s look at the data to make a test calculation. Right-click on the « OfficeSupplies » data and click on « View Data ». For example, you see that Nick sold 29 binders to $1.99. So 29 (Units) multiplied by 1.99 (Unit Price) equals $57.71 for this sale.

data science tableau calculated field data science tableau calculated field

In our data, we have no measure where « Units » is multiplied by « Units Price ».

data science tableau calculated field

To solve this problem, you will create an additional measure with a « Calculated Field ». « Calculated Field » si an element that allows us to create measures by calculating quantities.

To create this, right-click in the « Measure » zone and select « Create calculated field… ».

data science tableau calculated field

You can name the calcultated field « TotalSales »

data science tableau calculated field

Select « Units » uses the « * » sign to multiply and select « Unit Price » and click « OK ».

data science tableau calculated field data science tableau calculated field

Now, you can see that your measure « TotalSales » in the « Measure » zone.

data science tableau calculated field

By looking good, you can see that there is an « = » sign before the « # ». This is to indicate that this measure is a calculated field.

Ok, the measure is ready, let’s go. Put « TotalSales » on « Units » to replace « Units » with « TotalSales. Tableau automatically takes the sum aggregate.

data science tableau calculated field

If you want to do this more cleanly, you can remove « Units » by dragging it outside « Rows », then take « TotalSales » and put it in « Rows ».

data science tableau calculated field data science tableau calculated field

Now, that we have a « Bar Chart » with data from « TotalSales », we sort the bars in descending order by clicking here.

data science tableau calculated field data science tableau calculated field

As you can see, the results are different because Richard is no longer the best representatives in the East, it’s Suzanne. The best representative in the East is Suzanne, the best representative at the Center is Mathiew and the best representative in the West is still James.

it’s with the calculated field « TotalSales » that we can know who are the best representatives by region so Suzanne, Mathiew and James earn a bonus.

This was an example to learn how to create a calculated field in Tableau. Have fun creating new calculated field to master this tool that is really useful.

Share this article if you think it can help someone you know. Thank you.

-Steph

Explanation Of The Challenge And Data

challenge

I have just enrolled in a Data Science course on Udemy  and I learned good stuff.

This is the 1st challenge. Use your web browser to go to superdatascience website  to download a data set. In the « Part 1 Visualization » section, click on « Offices Supplies » to download the file « OfficeSupplies.csv ».

data csv file

To organize myself, I created a folder « Visualization » with 3 subfolders. Each subfolder corresponds to the section of « Visualization ». I put the data set « OfficeSupplies.csv » in the 1st subfolder.

data csv file

« OfficeSuplies.csv » is a CSV file. A CSV file is a text file that represents an table but the elements separated by comma.

You can open this CSV file with NotePad++  for PC or with Sublime Text  for Mac.

On the 1st line (column title), we see that we have 6 columns. Each column separated by a comma and the file contains 44 lines.

data csv file

You can also open a CSV file with Excel, OpenOffice  or LibreOffice  to have a table, which is easier to read.

To open a CSV file with Excel, here are the instructions :

  • Open a blank workbook

  • Go to Data tab

  • Click button « From Text » in the general external data section

  • Select your CSV file

  • Follow the Text Import Wizard (in step 2, select the delimiter of your text).

data csv file

This data set contains data from a store that sells office equipment :

  • Order date – date of sale

  • Region – The store is in 3 region (East, Central and West)

  • Rep – salesperson’s first name

  • Item – product’s name

  • Units – product’s quantity

  • Unit Price – price per unit

Each line shows how many sales there were for a product.

The challenge is to help the manager to know who made the most sales per region in the period of this data set. The period of this data set is from July 2014 to June 2015.

The person who made the most sales in each region has a bonus and there are 3 bonus so 1 bonus per region.

It’s will this challenge that we’ll use Tableau Public.

Share this article if you think it can help someone you know. Thank you.

-Steph

The Right Time To Offer A Paid Product

paid content

I watched an Oliver Roland’s video  and I learned good stuff.

It’s necessary to think of 2 things :

  • How to find the right time to offer a paid product while usually everything is free

  • How to handle fear and criticism about a paid product while usually everything is free

The right time

the right time

The right time varies depending on the sale mode and type of product. The approach to proposing a product is different when you do a webinar, a product launch  or a sales page.

The easiest way to sell a product is to make a sales page because you don’t need to worry about the minimum subscribers number to have in your mailing list.

What is extremely important to understand is that you need to stop being obsessed by the number of subscribers on your social media (Facebook, Twitter, Instagram, Snapchat, Youtube, etc.) because it has not value. Let’s me explain, what is really important is the subscribers number of your mailing list (newsletters).

A lot of people have success on Youtube but unfortunately they need to stay on Youtube’s platform to keep their success. It’s really difficult to bring Youtube’s subscribers to another platform or another website. It’s even worse on Facebook because people are so used to the social media’s graphical user interface that they really have to give them an interesting reason to go elsewhere.

Survey

survey

Yes, with a survey you can attract all your social media’s subscribers to your own website. I advise you to do a survey when you reached 500 subscribers in one of your social media.

With a survey you can know :

Your audience reactvity

  • Your audience’s reactivity

  • What product wants your audience. This reduces the risk of creating an unsaleable product. The mistake entrepreneurs make is to create the product they want to do. For 1-2 years they work on it and when it’s ready, nobody wants to buy it because it doesn’t solve a problem of the audience.

When you reach 500 subscribers in one of your social media, you can say to your audience : « Hello, my friends, the community develops and it’s thanks to you. I would like to help you in a more efficient way that is why I propose you to answer a small survey where you’ll be able to tell me how I can help you to solve one of your problem ».

People who answer to this survey will show you the real reactivity of your audience. By exemple when you have 1000 subscribers, you have an average of 100-200 people responding to the survey.

The result of this survey will help you to create a product that will interest your audience.

Mailing list

Buid your mailing list (newsletters) is more important than having the maximum number of subscribers on your social media because they’re qualified potential customers. This what is make the difference between your subscribers who consume your content for entertainment and your subscribers who consume your content because it improves their lifestyle.

To build your mailing list (newsletters), offering an interesting free bonus to your audience is an effective way to collect qualified emails from people who are likely to buy your product. If you have no idea to make a bonus, you can make one by intuition and after adjust or change after conducting a survey.

eBook

By exemple if you have a Youtube channel or a Facebook Page about hamsters, by intuition you can imagine that the main problem of people is to ensure that their hamsters are well fed and long live. So you can write an eBook (digital book) like : « 5 tips for having a well-fed hamster and long live.

The concept is to offer something free in exchange for an email from someone of your audience. You really have to give something interesting so that people are : « Wow, it’s cool. I gave my email and I got it all ! ».

Criticism

criticism

I’ll be simple. All people who aren’t happy because you offer a paid product are supporters of slavery. Usually people aren’t aware of it. When you see a critic like : « It’s was great before, you offered a lot of free content and now you want to sell a product, it’s horrible ! ». What do you think ? Me I’m thinking of a person who wants me to work for him/her for free for life. And how do we name it ? A supporter of slavery.

Don’t be afraid ! You continue to give free content to your audience and in the same time your offer paid content. You don’t blackmail with your audience, your propose and people make their decision.

By having paid product that filter out people who recognize that your work deserves salary and people who are unconscious supporters of slavery.

Don’t worry, critics hurt at the beginnings but then it goes better and you gonna laugh at it.

-Steph

P.S. Smartphone apps :

To track my calories, I use MyFitnessPal 

To track my workout program, I use Jefit