Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 5

Classwork 5 – Level of Detail(EXCLUDE) Calculation in Tableau

Student Name:

Student ID:

Date:

Note:

 Take all the screenshots uncropped i.e. date and time should be visible in your screenshots.
 You need to submit your answers in a separate word document. No need to write the
questions in it. Put the question number and your solution. Do not provide the screenshots of
intermediate steps.
 There will be deductions for providing more than what is asked.
 Please turn in your answers in a word file and your twbx file.

The objective of this exercise is to use learn how to use level of details calculations in Tableau to change
the level of granularity on the work sheet.

The dataset is again the same – the superstore dataset. It has two sheets ListOfOrders (details of order
like order number, city, customer name, state etc.) and OrderBreakdown (what goes in each order).

Our aim is to
 Analyse the profit of respective state and
 To find out each city’s contribution in that profit.

Theory:

There are three level of details (LOD) in Tableau.


 Include – Include the data from a higher level of granularity while being on the lower level.
 Exclude – Opposite of Include
 Fixed – The calculation happens at the level of granularity specified in the formula. It doesn’t
matter if we have to go higher or lower level of aggregation.

In this classwork, we will start our work where we had left the last time i.e. Classwork 4. We have
created the sheet for LOD Include. In this classwork we will work on LOD – Exclude.

Step 1:

Open the twbx file from classwork 4.

Duplicate the sheet Map by right clicking it and selecting “Duplicate” from the menu drop down.
Drag it to the end.

Rename it “Exclude - LOD”.

Now click on the + sign of States pill in Mars card to go to the level of detail of City.

Now, we will create a calculated field.


Click on Analysis and then select Create Calculated Field.

Name it LOD State Profit and type the following formula.


Click on apply and then OK.

Before moving forward, lets duplicate our map the same way we did for LOD Include sheet.

To do so, click on the green Longitude pill in Columns, hold control key and drag it in column itself to
create a duplicate. You will see that your map is duplicated in the same sheet.

We will do the changes for the map on the left.

Click on the first Longitude in the Marks Card.


Replace SUM(Profit) with the new calculated field you just created i.e. LOD State Profit.

Zoom in to see if you can get the profit of State labelled to each city.

Annotate the two maps in the same way you did for the maps of Classwork 4.

Annotation for map on the left: WITH LOD CALCULATION.

Annotation for map on the right: WITHOUT LOD CALCULATION.

Paste the screenshot of your sheet.

You might also like