These examples are available in the following blog post related to LOD Expressions: https://www.tableau.com/about/blog/LOD-expressions and in the videos contained in this article. There is a sample packaged workbook demonstrating these solutions in the Attachments section of this article.
Based on the customer names of the Sample - Superstore data source, we want to know when customers where acquired, next to all orders they made.
Create a calculated field to show the acquisition:
{FIXED [Customer Name]: MIN([Order Date])}
Build the view:
These steps will show the Sales based on the acquisition date of the customer.
To view the steps showed in the below video, please expand the above section.
Note: the video has no sound.
In this example, we want to view the sales difference of the exact same week on the previous year.
Create a calculated field to restrict the data to the maximum date of orders made in the data source.
{MAX([Order Date])}
Create a calculated field to show the day of the maximum order date.
DATEPART('dayofyear', [Max Order Date])
Create a calculated field to show the numbered day of the year in a calendar year.
DATEPART('dayofyear', [Order Date])
Create a calculated field show the previous year information.
{min(year([Max Order Date]))}- 1
Create a calculated field show the previous year information.
[Day of Year of Order Date]<=[Day of Year Max Date]
To view the steps showed in the below video, please expand the above section.
Note: the video has no sound.
001466925
1303 KB

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.