You can do a sort using the icons on the menu bar at the top but cannot use the sort by field option. This is fine as long as your data does not change.
There's also a possibility you could join these data sources to get all values in one source.
I have thought about joining the data sources but, would rather not just because they update at different times and would cause a major headache in upkeep.
I just don't understand why my field doesn't show up when I choose to sort by field. Why is that?
Because of the two sources - must be a limitation in the SQL - you can often sort using the icons in a way that's not possible using the calculated sort.
So I sent this question to support and this is their reply:
This issue is occurring because the calculated field
includes fields from the secondary data source. Tableau Desktop cannot sort on
a calculated field that is generated based on values from two different data
It is possible to work around this issue by placing both
data sources into a single Excel workbook and joining the tables instead of
blending. I have created an example Excel workbook with one sheet for
PopulationSample and another sheet for Sample Data. I then created an example
workbook, attached, and joined these two tables together using an Inner join on
Georg. By joining the two data sources together the Pounds per Pop calculated
field can be used to sort Georg. Instructions for creating the view are
included in the caption of the worksheet.
So in other words - when blending data sources don't try and sort by a calculated field that is created using both data sources.
Did this change in Tableau 8? Can we sort on a calculated field that is based on two data sources that are blended?
Sorry for the very slow response I have been out of town. No this didn't change with Tableau 8. The response from their support above was actually regarding Tableau 8.
Since the time I asked this question I have been forced to use queries more as suggested by the support team and my views and tables and the overall performance of my workbooks have been much better. I found that it is a crutch to try and blend the data like I was doing.
Thanks for your reply. Yes, i know joining the data sources in excel could be an option. But, the data sources i am working are huge databases and disparate data base types. There is no easy way to bring them into one common platform to enable join. It has to be blending.
Attached is an example of what i am talking about. So the profit and sales are coming from Coffee chain (Access) and i made a calc field 'coffee profit to superstore sales' which is a ratio between this source and the superstore (Excel) source.
I want the states to be automatically sorted in the descending order of the 'metric' parameter every time the user changes the metric. Also, lets assume that we dont want the user to manually use the 'sort' buttons on the toobar.
Is there a way to get around this? I am hoping so!
I can confirm that when changing to a join, the sort option is now available. Wow. I had no idea..
This next tid bit is off topic, but I'm going to add it any way to help other developers. A problem of the same nature as described above is true for the availability of fields to use as parameters in a URL. I had a dashboard action to open a map in Google Maps. I changed to a join and the lat/long for my data are now available and my URL call to maps.google.com is working.
This worked because my files are manageable and I have root/admin over all the resources.
It could be a problem operationalizing this solution for production. I'll try to save the join as a data source and then save this new data source to Tableau Server and see what happens.