The below steps are specific to the SuperStore Sample data source and can be reviewed in the attached workbook Creating Dynamic Column Headers.twbx.
IF [Order Date]>= [Range 1 - Start] AND [Order Date]<=[Range 1 - Stop] THEN ([Sales]) ELSE 0 END
IF [Order Date]>= [Range 2 - Start] AND [Order Date]<=[Range 2 - Stop] THEN ([Sales]) ELSE 0 END
STR((DATENAME('month', [Range 1 - Start]))+ " "
+ DATENAME('day', [Range 1 - Start]) + ", "
+ DATENAME('year', [Range 1 - Start])) + " - "
+ str((DATENAME('month', [Range 1 - Stop]))+ " "
+ DATENAME('day', [Range 1 - Stop]) + ", "
+ DATENAME('year', [Range 1 - Stop]))
STR((DATENAME('month', [Range 2 - Start]))+ " "
+ DATENAME('day', [Range 2 - Start]) + ", "
+ DATENAME('year', [Range 2 - Start])) + " - "
+ str((DATENAME('month', [Range 2 - Stop]))+ " "
+ DATENAME('day', [Range 2 - Stop]) + ", "
+ DATENAME('year', [Range 2 - Stop]))
Select a start and stop date from the quick filters on the right to update the headers.
To view the steps showed in the below video, please expand all the above sections.
Note: the video has no sound. To view the video in high quality, click the YouTube icon below to watch it on YouTube directly.
001458067
1227 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.