If we want to show all 15 countries data on the view, we go for custom SQL.
Some times data in 2 databases may not having the same names ( Like USA in 1 Database , United States of America in another Database) , we have to edit the names & define the Aliases then it will match.
2.drag country to row shelf to get a list of countries.
3.right click on any country name and edit alias (at the bottom). change it
to match the target country name.
Example:
The problem is the countries are in different notations: One is in short form, the other is in long form.
Say, one is like this:
Country_Short
US
UK
CN
FR
The other is like:
Country
United States of America
United Kingdom
France
People's Republic of China
How to blend them? Are they blendable at all? The answer is affirmative, not without a little twist though. I am listing two ways of doing it. Assume both data sources are connected.
1. Create a calculated field [Country] based on [Country_Short]:
Using this newly created dimension [Country], you can blend with the other data source.
2. Add an alias to each country in the [Country] list of the second source.
- open a fresh worksheet
- drag [Country] to the row shelf
- right click on each country and click the last item of the context menu which is Edit Alias
- edit the alias of 'United States of America' to be US and so on
- make sure all the aliases are the corresponding names in the other table.
Either of the above lays the ground for blending the two data sources. We are ready to blend.
To blend naturally, rename the two country dimensions to be exactly the same. Tableau will try to link up the two dimensions automatically through intelligent guess.
If you want to keep the dimension names different and still want to blend the two tables,
- open menu Data>Edit Relationships
- link up the two dimensions there, using custom method to join the two data sources.
Note that for some data sources such as published data extracts, you are not allowed to edit aliases. Quite a weird restriction. The workaround is to duplicate the dimension in question, and work on the duplicate.
You may also right-click any dimension to edit the aliases for the whole filed.
In Tableau Desktop 8: Right-click Dimension>Default Properties>Aliases...
In Tableau Desktop 9: Right-click Dimension>Aliases...
=================================
Join VS Blending
Joining is the Better Approach than Blending when two tables located in the same Database & Same Schema, Since
1) If we implement Data Blending, Can't use the "Show Relevant Value option (Cascading Quick Filter), If we use Join then it easier.
2) If we implement Data Blending, We can't apply the Global Filter when different reports from Different Databases, If we use Join then it easier.
3) Blending woks like Left Outer Join. Joining can support all kind joins (Inner, Left, Right,----)
4) Measure Names, Measure Values does not appear in the Second Database, So Joining is better in the approach.
5) We can't apply the Action from 1 report to another in the Dashboard when different report are built using different Databases.