Saturday, August 13, 2022

25 - Order of operation in Tableau

 

Tableau Order of Operations

The order of operation is about the order of execution in tableau. When we perform certain queries or operation there is a pipeline through which query gets executed. The operation such as create different types of graph, apply filters such as color, size, text, create calculation fields, create the view, etc. There is a procedure to produce results as a filter or view, tableau cannot produce anything you want. Data gets manipulated while performing any operation. When we get to know each level of detail about the process it will be an advantage for users. There is always an advantage of understanding every level of operation in tableau.

How to do an Order of Operation in Tableau?

We are going to show the flow of filters in tableau. Each filter has its own values or way to work with tableau data. Extract filter is used for extracting data file, it can be present in forms like excel, text, online server, JSON file, etc. A data source filter is for extracting data sources such as file dragged to, the table gets created into data source sheet. Context filter contains filters such assets, conditional filter, top N, these would be used for finding value from the context. Dimension filter contains data blending which is used for combing two axes into one which will give us more certainty of the data. Measure filter is used for measure value such as the forecast of temperature, weather or table calculation we can create a calculated field for the numeric data. Table calculation filter contains a trend line and the reference line will provide insight into the data and will highlight trends in data.

trends in data

Examples to Implement Tableau Order of Operations

Below are the examples:

Example #1

We will work with the context filter and will see how this filter will help us to speed up the query performance and result of the data. We will convert the dimension filter to the context filter.

  1. Open the tableau desktop or public version.
  2. Open sample superstore dataset or you can use the dataset of your choice (from tableau site you can get n number of the different dataset). This is nothing but the extract filter.
  3. Drag the order table into the data source filter.
  4. Drag sales measure to columns
  5. Drag customer Name dimension to
  6. Drag city dimension to
  7. Drag city to Filters -> click on none ->select New York City (you can select of your choice).
  8. Drag customer name to Filters -> click on Top -> select By Field as Top

When you click on Top 10 you will get to see the result as only 5 results because Top and dimension filter is applied simultaneously. Now add context filter to the city filter.

Top and dimension filter

  1. Right-click on city Filter -> select add context You will get to see the result as Top 10 customer as per the sale.

Top 10 customer

Examples #2

We are going to show the profit as per the state and product name.

  1. Drag profit measure to
  2. Drag product name and state dimension to
  3. Drag product name to filters and select some of the
  4. Drag state to filter -> go to the Top -> click by field and select the top
  5. Click on product name -> select add to the

When will add context view, measure color will get changed. You can see the color of Product Name.

measure color

Example #3

  1. Drag sales measure to columns.
  2. Drag sub-category and city dimension to
  3. Drag the city and sub-category to
  4. Select the city like Los Angeles from
  5. Sub-category from Filters -> go to Top -> select By
  6. Add context filter to the city. Click on the city ->add to the context

Tableau Order of Operations - 5

  • If we select two or three sub-categories from filter then the result will be different, it might show the top 10 or less than 10.
  • You can observe in the below image we have selected sub-category as Accessories, Appliances, Machines, and Paper. We can observe that the limit is set to 10.
  • But we are not getting the top 10 results because selected categories have less than 10 data assign to.

Tableau Order of Operations - 6

Conclusion

We have learned about the order of operation in tableau. Sometimes we don’t get the result as expected because there is a pipeline of executing tableau function. We don’t get through it then we are getting results as an error. It is always god to follow the order of operation which will simplify the execution of the tasks or operation performed.

No comments:

Post a Comment

39 - charts - histogram

  Build a Histogram Applies to: Tableau Desktop A histogram is a chart that displays the shape of a distribution. A histogram looks like a b...