Are you saying the value in the field is: "Mar FY2016 Unallocated" ?
Will the year portion always fall in the 7th character? If so, use the MID function to grab from 7 through 10, and wrap that in the INT function to make it a number.
But if the position isn't fixed at the 7th character, then use the FIND function to find where the 2 is (assuming that there won't be some other occurrence of a 2 before the year portion of the string.) Then use the MID function to grab from wherever the FIND found the 2, plus 3 more characters, and wrap that in the INT function.
So the short answer is, "it depends".
But yes, you can do it.
Provided the dimension name for the "Mar FY2016" is "Date".
Make a calculated field: Year:
However, this is a string. If you need a date format, use:
This is a date format, and it makes the date 1/1/2016.
When you drag it to view, use Year() it will five only the year 2016.
Hope it helps.
I think I should have been more clear in what i need
I have a whole bunch of columns that are NAMED [Mon FYYear Unallocated]
the values in each column are floats and they are right next to each other. I need some way preferrably to make a column with 2015-2018 as the values that will add up those with the corresponding year
so i'll get a view like
Total Unallocated : $XXX Total Unallocated : $XXX
1 of 1 people found this helpful
Your data is not "shaped" in a way that you can easily do what you want to do.
Is this an excel data source? If so, you can edit your data source in tableau and PIVOT those columns so that they all become one column, with a separate row for each value under each original column name. You'll get two columns from this. One will be called [Pivot Field Names]. with values that were the original column names. The other will be [Pivot field values] with the FLOAT value you had in the original columns. Then you can do the sorts of manipulations we talked about earlier.
If you're not using an excel data source, then you will probably have to ETL your data (pre-process your data) outside Tableau before creating a data source with it. If you're using SQL to generate your data, SQL has a pivot function, for example.
Thank you I appreciate the help. I was worried that this would be the case but I had to try anyway thank you.