I have a parameter that allows the user(s) to decide if they wish to view a graph by a day, week, month, quarter, or year. Everything about it works, as required with one exception, and that's the axis.
For example:
CASE [Param_Date]
WHEN 'D' THEN DATETRUNC('day', [Date_Field])
WHEN 'W' THEN DATETRUNC('week', [Date_Field])
WHEN 'M' THEN DATETRUNC('month', [Date_Field])
WHEN 'Q' THEN DATETRUNC('quarter', [Date_Field])
WHEN 'Y' THEN DATETRUNC('year', [Date_Field])
END
To tie in with how the chart displays, I'm looking to get the axis showing in different formats:
D -> dd-mmm
W -> \Www yyyy\
M -> mmm-yy
Q -> \Qq yyyy\
Y -> yyyy
Is this even possible within Tableau? If not, suggested workarounds?
see the 10 and 11th example https://jimdehner.com/2022/07/05/parameters-how-tos/ without your custom formats the 10th will work - because you have a unique way to see things i would use a sheet swap