To show only the month without showing the drill down of the hierarchy, create a calculated field similar to the following:
Hope this helps!
That almost does it. The only issue then is that there isn't an easy way to format the dates in different ways. For instance, in the picture from the original post, I had formatted the dates to be only the first letter, which is necessary in the dashboard I created due to size constraints. However, if I create a calculated field that takes only the first letter of each month - left((datename('month',[Order Date]),1) - and put that in the columns shelf, Tableau automatically aggregates January, June, and July as they all start with J, etc. Is there a way to force Tableau to break these out?
1 of 1 people found this helpful
One option would be to put MONTH(Order Date) on the view, but right click on a it and un-check Show Header. The other option would be to create a calculated field similar to the following:
if datepart('month', [Order Date])=1 then 'J'
elseif datepart('month', [Order Date])=2 then 'F'
elseif datepart('month', [Order Date])=3 then 'M'
elseif datepart('month', [Order Date])=4 then 'A'
elseif datepart('month', [Order Date])=5 then 'M '
elseif datepart('month', [Order Date])=6 then 'J '
elseif datepart('month', [Order Date])=7 then 'J '
Place extra spaces after the duplicate letters so that they are not the same string. Hope this helps!
Thanks for your help Tracy. It looks like that will work in most cases, but not all.
I also have an hourly look at call data in this dashboard ("Hour example" attached). Again, I do not want the user to be able to drill into the minute or second detail. I created a calculated field that pulls the hour out of my "time" field, placed that on the columns shelf, and then hid the header for the automatically generated hour field. However, there are two issues. The first is that the "AM" and "PM" do not show up. I could probably set up a calculated field to do this part. But the other issue is that the addition of a second dimension in the column shelf breaks my line chart. Lines do not pass through panes to my knowledge (one of the few pet peeves I have with Tableau), so my line chart turns into a dot chart ("Hour example 2" attached).
What if instead of trying to show them all at once, a parameter was used that displayed only each desired increment at a time? That's the only other option I can think of at the moment.
Apologies if this post is too old, but I find it relevant to my situation.
I can disable the drill down in the suggested way, but the Table Calculation relying on the Date field is completely messed up :-(