I can think a way to do this, for example a calculated field like "Metrics_" + DATENAME('month',MAX([Given Date])). In your question you didn't say how the data is refreshed, so [Given Date] in the calculation will need to come from a date field in the data source. I often have a "Run Date" or "Report Date" in my data sources for this reason.
Thanks for your help. However i want the name of the calculated field to be dynamic and not its value.
I am pulling the data for last month through a custom SQL.
I am using some calculated fields in a bullet graph. My aim is to make the axis labels of the relevant calculated field dynamic. As in, for December,2011 (which i have in a date variable) the axis label should be Metric_December,2011.
Let me know if you need something more to understand this.
Thanks a lot.
Based on what you wrote, I think you can do this with some combination of hiding headers and/or field labels. When you drag a calculated field that is a string value onto the Rows or Columns shelf, it is considered to be a discrete measure and Tableau automatically generates header columns or rows for that. You can then play with the Show Header option (right click on the pill) and/or Hide Field Labels for Columns option (turn off by right-clicking on the header text) to effectively make the axis label the dynamic calculation.
If you need more help, I'd suggest posting a packaged workbook with sample data.
I have similar situation, I have a workbook with cross-tab report where the first column is the City and second one is Product category. With a parameter I can control de column data, but the Header still the same and could not find how to change them.
Now, The user can swap first and second column using a parameter, The solution was creating two woorkbooks,
first workbook: Column order: City then Product
second workbook Column order: Product then City
and using the solution for Ken Gamble
Another helpfull tip is using the title to show the month used in calculation, and it will change it every time to change your data is recalculated according a parameter or dimension.
Did you get your problem solve? I have almost same situation that I would like to dynamically change calculated filed name so that when I select a parameter value from a filter then the filed name will switch it to match for the column1 and column2. I can set it work for the report title, but not the filed name.
can you please share your workbook which demonstrates the solution. I need dynamic headers based on what is selected in the filters.