LOD calculation with date ranges

0 votes
I am trying to figure out total sales within a fiscal year. So total sales between 7/1/2019 and 6/30/2020 by customer.

Thanks!
Aug 27 in Tableau by Amanda
• 120 points
118 views

1 answer to this question.

0 votes

Hi, @Amenda,

You have to follow a few steps which are given below:

Step 1: Set up the Visualization

  1. Open Tableau Desktop and connect to the Sample-Superstore saved data source.

  2. Navigate to a new worksheet.

  3. From the Data pane, under Dimensions, drag Region to the Columns Shelf.

  4. From the Data pane, under Measures, drag Sales to the Rows Shelf.

    A bar chart showing the sum of sales for each region appears.

Step 2: Create the LOD expression

Instead of the sum of all sales per region, perhaps you want to also see the average sales per customer for each region. You can use a LOD expression to do this.

  1. Select Analysis Create Calculated Field.

  2. In the Calculation editor that opens, do the following:

    • Name the calculation, Sales Per Customer.

    • Enter the following LOD expression:

      { INCLUDE [Customer Name] : SUM([Sales]) }

  3. When finished, click OK.

answered Aug 27 by Gitika
• 41,360 points

Related Questions In Tableau

0 votes
1 answer

Tableau Trend Line with Date Field Calculation

Try This: if Date= today() then 1 elseif dateadd('day',- day(DATEADD('month',1,Date)),DATEADD('month',1,Date))=Date ...READ MORE

answered Aug 24, 2018 in Tableau by Atul
• 5,540 points
566 views
0 votes
1 answer

Creating a calculated field with LOD expression

Go ahead and try the following three ...READ MORE

answered Apr 20, 2018 in Tableau by Atul
• 5,540 points
276 views
0 votes
1 answer

Error: Comaparing date value with YEAR in Tableau

You have to ensure that the comparisons ...READ MORE

answered Jul 11, 2018 in Tableau by Atul
• 5,540 points
116 views
0 votes
1 answer

How to filter/parameter for different date ranges

Steps: Create a parameter control that the users ...READ MORE

answered Jun 20, 2018 in Tableau by Atul
• 10,240 points
2,754 views
+1 vote
1 answer

Tableau - Filter/Parameter For Different Date Ranges

Based on your comment and updated question, ...READ MORE

answered Jul 19, 2018 in Tableau by Atul
• 5,540 points
241 views
0 votes
1 answer

LOD expressions- Create a calculation that is not affected by filters.

Hi Nikki, Your LOD expression is correct, but ...READ MORE

answered Apr 2, 2019 in Tableau by Cherukuri
• 32,490 points
464 views
0 votes
1 answer

Compare grand average with individual average using Exclude LOD

Hi Anitha, Follow below steps: 1. Create a calculated ...READ MORE

answered Apr 17, 2019 in Tableau by Cherukuri
• 32,490 points
123 views
0 votes
1 answer

How to perform a calculation using one variable with an aggregation in calculated field?

Hi, You can use the calculative field and ...READ MORE

answered May 20, 2019 in Tableau by anonymous
• 32,490 points
90 views
+1 vote
4 answers

How to Update my Start and End dates parameter or Filter with Today and Last 5 Days Date Automatically ??

Create a calculated field and set its ...READ MORE

answered Jul 31, 2019 in Tableau by anonymous
981 views
+1 vote
1 answer