How to use one filter on two separate fields at the same time - tableau-api

I am working on a Tableau visualisation of network data, showing trends in user behaviour.
I have a table with users (USERS) and a table with network messages (MESSAGES): Each message has a sender and a receiver from the list of users.
I have two worksheets, one showing trends of outgoing messages and one showing incoming messages. The two worksheets are placed in the same dashboard.
How can I create a filter dropdown containing all users from USERS that filters senders in one worksheet and receivers in the second worksheet?
I have tried to duplicate the MESSAGES data source and blend USERS with two different fields, but the performance is not acceptable. Any ideas are welcome.
Thanks in advance

Create a new parameter:
data type string
allowable values set to list
add from field - user field
Quick filter on user-sending
select condition tab, By formula
[user.sending]=[user.parameter]
Repeat for user-receiving sheet.
Lastly, right-click user.parameter and select 'add to sheet' (or add it to you dashboard).

You can do so by selecting the 'use all' option rather than using a range or a list. This works very well for dates especially as it shows a calendar and then you can pick the date you want to see.

Related

Get full date range of linked field in tableau

Gif of problem
I am currently working on a dashboard in tableau, which shows the count of New-User-Signups and Interactions side-by-side given different date windows. The first New-User-Signup happened before the first Interaction, and the last Interaction happened after the last User Signup.
In order to choose a date window, I linked the date fields in both data sources, and made a date filter, which I applied to all worksheets using related data sources.
However, depending on which "date" field I choose, (from the User Signup table or the Interaction table), the "All Dates" option of the date filter only goes from start to end of that data source's date range.
No matter what I try, I exclude some entries in either one graph or the other. How can I make the "All Dates" filter go from the minimum first date between both data sources, to the maximum last date between the two data sources?
I run into this issue a lot with the data that I use. The problem is that the filter will only be able to contain dates that are in the dataset it is created off of, even if you link the data sources. When I run into this issue, I use parameters instead.
You can find instructions here:
https://kb.tableau.com/articles/howto/creating-a-filter-for-start-and-end-dates-parameters

Static column in tableau but rest all columns dynamic with filtering

I am building a tableau dashboard which has month, region, and account type filter. (Account type can have only two values either New account or old account)
The table in the report should have the following columns:
Month,
Region,
Clicks,
Signups.
Now the issue is clicks are independent of the account type and signups is dependent on the account type.
I am required to create a static clicks columns i.e when a user filters on account type then only signups column numbers change but clicks remain the same.
I have tried multiple ways to create this table but I am unable to reach a solution to this. I also tried creating two workbooks- one with just a clicks column and the other workbook with rest of the columns. After which, I pasted them together side by side in a dashboard. But the formatting looks extremly off and not professional.
Could you please guide me as to how I can achieve this?
You can use a level of detail expression. These are calculated prior to any dimensional filters and therefore will be unaffected by these actions:
Create a calculated field as follows:
{ FIXED [Month], [Region]: sum([Clicks]) }
This will calculate the sum of the clicks per month and region and ignore any filtering on account.
Let me know if this gives your desired result or if we need to refine further.

Tableau - Filter View Based on Different Variable

Is there a way in Tableau to filter a view based on its relationship with a different variable?
For example, say I have a dataset with variables Company (values = A, B, C) and Product (values = 1, 2, 3). In one view, I want to select a Product. In the other view, I want to filter to only Companies that have that Product, but I want to show all Products for those companies. The typical filtering approach in Tableau could easily show me which Companies have that Product, but the rows with other Products from the same Companies would be excluded by the filter.
Any solutions? I get the feeling I may be missing something simple.
Create a parameter to represent the product of interest. You can load the values of the parameter from the Product field, but will have to add/remove choices periodically as product list changes.
Place Company on the filter shelf, and use the condition tab to choose only companies that have that Product with a formula such as max(Product = [Product of Interest])
For more than one product at a time, create a set of Products instead of a parameter and change the formula to test for set membership instead of field equality. If you have a set of Products called [Products of Interest], note the plural, the formula is then simply max([Products of Interest])
The nice part about a set is that it notices changes to the database Products list automatically. The bad part about a set is that Tableau doesn't make it easy to add or remove elements from a set in the user interface unless you are using Tableau Desktop (at least not by version 10.1)
In addition to the methods explained by Alex, (if you are okay with having multiple sheets) you can have 2 sheets linked with an Action filter -
First sheet would just show the unique list of Products (this acts as the Source sheet)
Second source would contain whatever view you like to show with Companies and their products (this acts as the destination sheet)
Create an action filter between the 2 sheets and use the "Selected fields" under Target filters to filter using the Company field. This way, if you select any specific product(s) in the first sheet, all relevant companies would be filtered in the second sheet but all the products show up too!
EDIT: this is a good solution in many cases, but there are a few things to be careful about.
Note that the first sheet needs Company on some shelf, possible detail, so that field is available for the filter action. If there can be multiple companies per product, then that can complicate the viz a bit.

How to filter two categories on dashboard? Tableau

I have 3 sheets I'd like to filter on the dashboard: months, supervisor name, and supervisee name. What I would like to do is have the functionality to click on a month, and have everything filter. I'd also like to click on the supervisor and supervisee, and have it do the same thing.
The problem is, that my supervisees keep disappearing every time I select a supervisor. The data is set up as a hierarchy within tableau and is on a corresponding line in the original hard data. Any help or suggestions?

Set the latest date value to the Quick Filter in TABLEAU

There is a live worksheet called Person with columns - Names & Birthdays. Need to create a quick filter with a default value pointing to the latest birthday.
For example: If there are 3 Records as follows,
Names Birthdays
A 8/9/1993
S 6/5/1994
Z 8/15/2000
The filter should hold the default value 8/15/2000 in it with other values unchecked in the drop down list.
I believe I see what you are asking. When you add your filter click the little drop down arrow in the filter --> edit filter-->select the tab labeled "Top"--> by field radio button==>Top from the first drop down-->enter 1 in the next field which will say by after it-->select birthday from the next drop down--then maximum. This will change the view to show only the most recent birthdate. Hope this helps.
Tableau currently doesn't give you dynamic control over quick filter defaults. For dates. They generally start out with the settings that were published.
Here are a few easy suggestions that are similar to, but not exactly, what you want. At the end, there is a way to do exactly what you want at the cost of more effort.
For continuous date fields, you can set the filter to show Relative Dates and the filter allows the user to easily set a range of dates showing the last N days, weeks or months relative to an anchor date. The anchor date defaults to the current date.
For discrete date fields, you can display a top filter as tia97 recommended, and show an integer valued parameter control to allow the user to pick N to see the latest N birthdays. (i.e. the N youngest people)
You could try other variations using parameters, calculated fields and quick filters, but it might be simpler to just show the list of birthdates and let people choose.
Finally, if you are publishing this workbook to Tableau Server, you can use the Javascript API to control the filtering user experience yourself. You can embed the Tableau visualization in a web page, surrounded by custom HTML, CSS and Javascript that you define. Build whatever controls you want for user interaction, and then send JavaScript commands to Tableau to direct the filter actions. More effort, but you get a lot more control over the UX.
Generally, I'd use the builtin features in Tableau Desktop as far as they go to get most of your desired UX quickly and easily, and then save the JavaScript API work for final polish on only your most public visualizations that really need it.