Are you using adhoc calculation for colors by a chance? I've written a short article that color changes may occur in such situation here: http://meowbi.com/2016/10/27/shapes-out-of-shape/
In general color changes when datasource is refreshed / changed and Tableau engine has to recalculate values for colors. Could You please post sample twbx file so we can assess further?
No we aren't using any adhoc calculations but we are using calculated fields.
Unfortunately I am unable to post any workbooks as the data I am using is classified data and I am unsure how to replicate the issue.
What's strange is that the views work fine in their own separate workbooks but when copying and pasting them into one workbook that's when the issue occurs.
I know it's hard to visualise the issue without a workbook so sorry about that.
Hmm.. I think that this might be the case. What do you mean by copying data from one sheet to another? When pasting the data, recalculation may occur and that's why the colors keep changing.
What is the datasource for this Viz? CSV?
So I'm right clicking the sheet from one workbook and copying it and then pasting it into another workbook. This brings the view and also the datasets across too.
The datasource's are excel (xlsm).
Just did the same operation and formatting is still in place.. Right click on Sheet name tab> copy sheet> ctrl+n> paste sheet..
Have you tried copy formatting option? Right click on tab name> copy formatting. I know it's not the solution but will speed up re-coloring.
Btw: why do you copy data to a new workbook? You are supposed to do a large number of different, separate workbooks?
I'm actually copying whole Dashboards over, not just the sheet.
I've noticed something else as well. Before I published to the Tableau server I ensured that the colours were correct but when viewing the dashboards in the Tableau server the colours are again not the same as the workbook that I have locally.
This looks exactly like the problem with adhoc calculations. Could you please try to connect to .csv and see if it's still the problem?
It looks like I had the same problem with publishing to Tableau public. Upon publishing, my color got back to default. What helped me was to reassign colors and base color on separate field.
Before the change, my color was based on shelf calculation min(1). I created calculated field with just 1 inside, changed to discrete, pulled onto color. Now the most important part: I clicked color, selected color palette and clicked 'Assign'. From now on, my colors are as expected after publishing.
I believe I am having similar issues. For some time I have had issues with shapes and colors defaulting after reopening a workbook, but I have always been able to set the shapes and colors back to publish and it show as intended on Tableau Server.
Now, the problem has recently popped up when publishing the workbook to Tableau Server and its not necessarily default shapes and colors. Color is now typically black(or default blue/orange) as opposed to green/red and the shapes have been inconsistent. I am using aggregated calculated fields or calculated fields with blended data sources, which may be an issue, but only certain ones are affected. Some of my shapes/colors work just fine. I am not using any ad-hoc calculations either.
Examples of calc fields used for color(considered Measures because of the aggregates):
IIF(SUM(Field) > 0, 'Yes', 'No')
IIF(AVG(Field)-AVG(BlendedDataSource.Field) > 0, 'Yes', 'No')
I saw another thread about changing it to a Dimension, so I did change one of the calculations to IIF(Field > 0, 'Yes', 'No) and it seems to be working as intended, but this does not seem to be a solution where I need to use aggregated fields. Hopefully this is just a bug related to aggregated calc fields that gets fixed.
I think it's not only the case of aggregated field. Sometimes it happened to me with simple measure. Altough, Dimension approach you suggested might be worth giving a try where it's possible.
Is this also a known issue with color legends based on Groups? I have a Group that is used to color a stacked bar chart. It retains my colors (which are from the "Traffic Light" palette") just fine in my local desktop file, but on Tableau Server, the colors reset to some defaults. I'll do some experiments, but I'm struggling to understand the scope of this quirk.
EDIT: I replaced with the Group with a calculated field, and then the colors stabilized.
1 of 1 people found this helpful
This is now a known issue. I've been having issues with some of my assigned colors and shapes resetting after I save, close, and reopen my workbook. This occurs for some, but not all, of my bar graphs, shape icons, and color legends.
I submit a ticket with Tableau support last week and after a few days of emails the issue has been passed along to Tableau's developers and issued the ID 545760, so hopefully it will be fixed with the next patch.
The only workaround Tableau suggested was changing the data type of the dimension from string to integer. For example, instead of creating a calculated field such as:
IF SUM([Sales]) > 10000 THEN 'High Performing'.....
IF SUM([Sales]) > 10000 THEN 1.
Unfortunately, this doesn't work for many cases when color isn't intuitive enough and you need a properly labeled legend to add clarity to your dashboards.
Best of luck,
1 of 1 people found this helpful
Thanks for submitting to Tableau Support! This issue seems to be coming up repeatedly in community threads, so it's good that the developers are actively looking into it now.
Regarding the workaround — fortunately, you can assign Aliases to a calculated numeric field if it classified as a Dimension. Aliases are used on the color legend, so even if your calculated field yields a 1, you could still display it as "High Performing" (to use your example).