Last Modified Date: 19 Sep 2017
AnswerYou can change the dates' formatting through the use of String, Datename, and Datepart function in addition to manual sorting. For more information, please see the steps below:
- First, adjust the Case statement of your calculated field, so that the formula becomes similar to:
CASE [Date Level Selector] WHEN 'Year' THEN STR(YEAR([Order Date - Year])) WHEN 'Month' THEN DATENAME('month',[Order Date - Month]) + " " + STR(YEAR([Order Date - Month])) WHEN 'Quarter' THEN "Q" + STR(DATEPART([Order Date - Quarter])) + " " + STR(YEAR([Order Date - Month])) END
- Then, because the String function will reorder the fields in the view alphabetically, right-click the calculated field with the Case Statement
- And manually sort the Months field into the desired order.
Additional InformationFor more information about these topics, please see the following Tableau Help links:
Thank you for providing your feedback on the effectiveness of the article.
Open new Case
Training and Tutorials