Types of LOD expressions in Tableau

Want to take better control of the granularity of your calculations in Tableau? Then you must know the LOD expressions in Tableau. LOD or level of detail is the expression that allows the user to perform simple or complex calculations at different granularity levels. There are mainly three types of LOD expressions depending on the granularity level- Fixed LOD, Include LOD, and Exclude LOD. In this blog, we will use the sample superstore data.

  • Fixed LOD- Such type of LOD only considers the dimensions of your data. Whenever we are forming a LOD expression some dimensions are already present in data but some of them are created or generated by the user. Fixed LOD only considers the user-generated dimensions and not using the dimensions that are already present. 


To better understand the fixed LOD we are calculating Profit per day in the different product categories. We will take category and sub-category in the rows and profit per day (calculated field) in the column. Let's play around by removing the category from rows and you will see the results are unchanged. That's how fixed LOD works.


  • Include LOD- Include LOD is quite drastic to fixed LOD. As we know fixed LOD only considers the user-generated dimensions while the include LOD considers both the dimensions i.e. dimensions that are already present and the user-generated dimensions.

We are calculating the average sales of each product over different segments to do so we are considering the product id of every product. Drag the created calculated field to columns. Move segment and category to rows. Unlike the fixed LOD if you remove segment or category from rows the visualization will change.


  • Exclude LOD- Such expressions are used when we are removing the dimension from the LOD. Let's understand by creating a LOD expression of sales for each category and segment by excluding the order date.


To obtain it move the segment and category to the column while putting order date and measure names to rows. Applying the filter to measure names and select the calculated field which we have created and sales along with it. If we talk about the color scheme then apply conditional formatting to measured values. If we closely notice the values we are obtaining from the order date excluded are similar throughout the categories. It is because the total will be the same throughout.



Thanks for Reading  Let's connect on  LinkedIn.


Comments

Popular posts from this blog

Copying Bookmarks from one Power BI report to another

Playing with Totals in Power BI

Introduction to Power Ops