create filter from multiple data sources - tableau-api

I have multiple data sources that have city, state and country information.
Example -
Source 1:
ID City State Country
12345 New York New York USA
12344 Cebu City PHL
12232 Bengaluru Karnataka IND
Source 2:
ID City State Country
12345 Dallas Texas USA
12344 London UK
I would like to create a filter to show drill down option into country, state and city using both the databases. I cannot combine the source due to few sourcing issues. Not sure if a set can be created like union of the columns from the data sources to be able to show a filter that will have values from all the data sources.
Like..
Country = USA, PHL, IND, UK and then filter state and city and so on. Can someone please advise how I can achieve this?
The city, state and country columns are dynamic in my data sources

Quote from Tableau's online help.
You can union your data to combine two or more tables by appending values (rows) from one table to another. To union your data in Tableau data source, the tables must come from the same connection.
If your data source supports union, the New Union option displays in the left pane of the data source page after you connect to your data.
It's pretty easy to do inside Tableau Desktop.
https://onlinehelp.tableau.com/current/pro/desktop/en-us/union.html

Related

Filtering worksheet based on values in column of another worksheet

I have a dataset that contains ID, Department, and Sales for example.
In worksheet1, i will be filtering based on a single ID.
Is it possible for me to use the Department of that filtered person in worksheet1 as a filter in worksheet2 to show all the sales from that Department?
Heard about dynamic parameters but cant get my head around it to work

How to Display the Sales and Other Department Sales Seperatly on Tally

hope you all are good .I new to tally and I have a new situation ,I have provided the details below
1.we Own a supermarket and which contains some other departments as well
2.only one counter is available for this supermarket section
3.so the sales of other departments also get mixed with the total sale
Task :- when I enter this data into tally I have to show the other departments sales seperatly on balance sheet, how to achieve this
The Profit & Loss statement in Tally shows you the sales data of every Sales ledger separately. So, to have data on separate sales for separate departments, you will have to make different sales ledgers for different departments and make the entries accordingly.
If you are using combined single ledger for all sales, then you should make three ledgers now for sales of each of the three departments. If you are using sales ledger item wise or tax slab wise, then you need to create similar ledgers for every department and take care of choosing the right ledger when creating the voucher.

Tableau Username() function to filter Revenue data by SalesRep

How do I filter the Sales Revenue by SalesRep so that each SalesRep should be able to see only the sales volume generated by them using the username() function.
Let's assume John generated $2000 revenue, Jena generated $3000 and Eric generated $5000. Total sales volume combined for all 3 SalesRep is $10000. Employee ID of John is 101, Eric is 102, Jena is 103. I'm the manager and my employee ID is 104. I want to use the username() function in Tableau to filter the data in a such a way that John should see only revenue generated by him i.e. $2000 and he should be able to see the revenue generated by Jena in the bar chart. Similarly, Eric and Jena should be able to check their respective sales revenue. However, I should have the access to the revenue of all 3 as I'm their manager. How do I implement it in Tableau using the USERNAME() function.
One possible solution could be with the help of ISUSERNAME():
Let's say SalesRep is an existing dimension in the datasource which has sales representative's full name or username or empid (Note: In below illustration I am considering that it has username e.g. John, Eric etc. For other options refer here).
Create a calculated field SalesUsersList as below (here list down ALL
members entry):
IF ISUSERNAME("John_Tableu_Username") THEN "John"
ELSEIF ISUSERNAME("Eric_Tableu_Username") THEN "Eric"
ELSEIF ISUSERNAME("Jena_Tableu_Username") THEN "Jena"
ELSEIF ISUSERNAME("Manager_Tableu_Username") THEN "Manager_Username"
END
Create a calculated field LimitedAccessUsers as below (here list
down ALL sales team's members entry who will have limited access):
([SalesUsersList]="John") or ([SalesUsersList]="Eric") or ([SalesUsersList]="Jena")
Create a calculated field hasLimitedAccess as below. Drag it to
'Filters' section and select True
NOT[LimitedAccessUsers] OR ([SalesUsersList]=[SalesRep])
Don't forget to let us know in case it solved your problem :)

Tableau Map view Continent List

I have been trying to clean my data and have a column represent the various continents and ultimately have them represented on map view.
But it doesn't consider that column to be Geography and even when i forcefully make it, the same still does not show up in map view. Any suggestions?
Africa
Asia
Europe
North America
Oceania (Tried without this too)
South America
I don't think it is possible to have continent as geographic role in Tableau.
What you could do however is look for a list which maps countries to continents and then join with your original data source on continent.
This way all your data values get replicated for each country. When you then select the country column as geographic region you can get the effect you want.
List could be something like this.

Design Database schema for billing system

I want to design a database for billing system. In one bill a customer might have purchased multiple different items ,for example fot bill Id 1 customer purchased 2 apples 3 bananas and 1 watermelon. i want to know how i can normalize this database.
This is a pretty standard, basic normalization exercise with a pretty standard solution. The usual approach is to have an orders table containing order ID, customer ID, order date &c., and an order_items table with a record for each line item on the order.