If you want your years to be able to change, what you can do is set up a parameter to represent an editable number.
Here I represent 2013 and 2014 with parameters called [Year 1] and [Year 2]
Notice how the year range is 2000 to 2020: that mean you can select any integer between these numbers as your year.
Then do the same for year 2...
And then create your calculated field: [Year 1]/[Year 2]*100
I've attached the workbook. Let me know if that helps
david.twbx 37.1 KB
This is good Ailsa Zheng but,let's say for instance that you don't want to type the year. You just want to pick from a selection, in this example they are years but they could be product names or places. How would you deal with that?
Does anyone know how to apply Alisa's suggestion but for elements within the dimension?
So I’d spent the last few weeks trying to come up with a solution for our year on year month on month calculations and how to display them. I got some help from the Tableau team, but we weren’t quite there yet. I thought I’d share this solution in case it helps someone.
Initially I thought about using parameters to create a calculation between items in a dimension. That’s not a problem when dealing with categories as these are likely not to change that often. However when using dates it becomes tricky, often we only want to see one number and allow the user to select the range.
Inspired by the link below from Peter Gilks
I was able to create what I need and I’ve published a workbook in case someone wants to have a look.
Thanks Peter Gilks, you've saved me days of work.