1 of 1 people found this helpful
Parameters can't be updated automatically.
You can maybe set the year parameter as a range. If you put the maximum as a high number you don't need to update:
I'd also remove the thousand separator in the formatting:
Alternatively, you want to use filters but want them to be calculated BEFORE the fixed LOD calculation, then you could add them to context. Just right click on the filter and select add to context:
As parameters are not dynamic, hopefully the above two alternatives work for you.
Attached is a possible solution. I changed the field types for Year and the YearParam to String, and adjust Calculation1 accordingly.
This link also helps show Parameter/Filter integration: Filtering with Wildcard Parameters | Tableau Software
Hope this helps,
State Sample.sn.twbx 100.4 KB
Thanks for the additional detail. Parameter might not be the proper approach. However, I'm trying to do the colors to show changes in the geographies year over year.
So my maps should look like this:
The geographies that are the same from the prior year are in blue, differences are in red. I'm currently showing a quick filter to allow user to select the year (2018 sheet) and a parameter to use in the calculated field as that is the only way I can get it to work. However, this requires user to select both Year in quick filter and a value in the Parameter, not user friendly. What I'm trying to do is say: When user selects 2018, show all states Company A sells products in. If state was also present in 2017, color blue, if not color red.
My data has year in one column and states in another column, which is making it more challenging.
Hey Seth, Thanks for the reply. For some reason your workbook won't open for me, it just errors out when I try to open it.
see the attached
I used filters to get the attached results
with the following
If this posts assists in resolving the question, please mark it helpful or as the 'correct answer' if it resolves the question. This will help other users find the same answer/resolution. Thank you.
State Sample (1)_v10.2.twbx 127.5 KB
Thanks for the thoughts. It doesn't quite seem to work as I would expect. I'm just trying to look back one year. So if 2018 is selected I just want to see whether or not the state existed in 2017 for that company. This is such an easy solution in a scripting language, but it's driving me crazy in tableau! If 2017 is select, it looks at whether or not the state was in 2016, etc.
When selecting Mcdonalds & 2018, I would expect to see Texas and Arizona as "new" and California as "old". For 2017, I would expect to see Colorado as "old" and California as "new".
Thanks for the attempt, I'm dissecting your code to learn what you did as I'm sure it'll help me in the future!
Following up in case you still aren't able to open the 10.5 workbook I attached in a previous reply.
The first thing I changed was the data type for the [Year] field to String type. I then edited the [YearParam] to String type also.
This caused the manual calculation to break, so I edited it to the following:
Then, we will change the filter on the [Year] field to a Condition filter.
Now, the Parameter will control the [Year] filter. So you will only have to change one menu in the right-hand pane to adjust the view to match the images you attached above in this thread.
Hope this helps,
Thanks for the additional detail. I'm going to try opening this tonight and will let you know how it goes. Thanks!
Not sure whether you could union your data by itself or not, but in case you can do that, please find my solution attached without creating parameter.
below is the steps
1st, union your data to itself
create two calculation fields, one for filter years, and another for color. you can filter the map with both years, and current year only by this one.
Hope this helps
State Sample (1)_v10.2.twbx 140.3 KB