Skip to main content

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?

3 answers
0/9000