In Tableau, how to pass values to action filters that are not in pie chart? - tableau-api

I am using Tableau desktop 8.1.
I have created a pie chart showing Shift timings and number of employees in each shift timings under different departments.
The pie chart is as follows :
Shift Timing as the "Color mark"
Count distinct employee as the "Angle mark"
I have created an action filter whereby clicking on a shift timing in the Pie chart will display another sheet which shows various details of the employee under that particular shift time.
I have used Action Filter where the field i have passed to the target filter is "Shift Time".But i am not able to add the Department Field as a target filter to the Actions Filter as tableau desktop displays an error "Missing fields on Pie chart".
I need to pass the Department also to the Action filter ( but it is not present in the pie chart) as the user might select Multiple departments from the given list of Departments and the report should show the
My requirement is that if the user selects Shift time (for e.g 9am-5pm) and four departments then upon clicking the 9am-5pm shift in the pie chart should display the details of employees under those departments.I am not able to achieve this because i am not able to pass the Department as target filter into the Action filter.
Thanks and Regards

A little bit difficult to understand without seeing your actual workbook.
If I understand correctly, you want do display a pie chart, and when I click on a segment of the pie chart, you want to display a list of employees under that segment (shift time), but you also want to filter the department.
What I would do is to create a dashboard with 2 sheets, 1 with your pie chart, and one with the employee names/ids (simply drag employee name/id field to the rows and that's all). On the second sheet I would include a filter using department field.
Back on dashboard I would go to the pie chart sheet, click on the gray triangle on the top right, and select "Use as Filter". Then I would go to the other sheet, click the same triangle, go on Quick Filters and select the department filter. And voilĂ , the user is able to filter departments on the right of your dashboard, and click on the pie segments to select a shift.
Hope it helps

I have another way to resolve this issue.
Dashboard->Action->add action - >

Related

Dynamic data display in Tableau

I am new to tableau .I have a data contains date and rank ranges from 1 to 5. I am showing this data as a column chart.Here bars are the ranks...
I have other table which have columns like date,solvetime,rsla.
Now my requirement is If I click on the rank bar for a particular date then in the down it should show another bar chart which displays the solve time and rsla for that particular date.
Please help
Basically, this function can be implemented using the "use as filter" option of filter actions. So, you can use the selection from worksheet 1, as a filter to the worksheet 2.
For that, I would create a dashboard that would have both the worksheets with the appropriate reports created i.e. report 1 being the date and rank ranges, report 2 being the date, solvetime, rsla.
From report 1, I would click the drop-down menu of the sheet, to select the "use as filter" button and configure the filter action, on what sheet, on which field etc, using the dialog box that opens.
Please refer this link, which provides more depth towards what you might be looking for.
https://onlinehelp.tableau.com/current/pro/desktop/en-us/actions_filter.htm

How to filter top customers within certain section in Tableau

I have a Tableau file whose source is from one Excel sheet as shown below:
And it's how it looks in Tableau:
I have a Tableau sheet to show me the top 3 customers in each section. For example, company F, H, J, B, A are in section XXX, I filter section XXX only, sort F, H, J, B, A, select the top 3 customers and hit "keep only". So I have a table of top 3 customers in XXX section. Please see the pics below:
My question is, every month I have an updated Excel sheet with same format and I feed it into Tableau, the sales change every month but I always want top 3 customers in each section. For example, top 3 customers this month in XXX section are F, H, J but next month it might be A,B,H. However since I use "keep only" to filter F, H, J, the top 3 customers can only be F, H, J unless I manually change the filter. Is there anyway I can program Tableau to pick up the top 3 automatically whenever I feed new data to this file? I know "filter top n by" can do it but it can only filter by one variable, like they can only filter by sales instead of sales AND sections. I want to use "by formula" in the pic below to do it but I am not sure how to write the formula.
Have you tried to use the "Top" instead of "Condition" tab? You could also try to use a rank.
Create a calculated field "Rank", put index() into it, make it discrete and put it between your segment and customer pillow. Untick "Show header" and use it as a filter on the filter shelf.
I would use the Quick Table Calculation Rank. To do this create a new worksheet as follows:
Drag Section onto Rows
Drag Customer onto Rows
Drag Sales onto text mark
Drag sales onto detail
Right click the sales that you have dragged onto detail. Select Quick table calc and then rank.
Change this table calc from the detail mark onto the rank mark.
Now you can see what it is doing my default. You can see that is will be calculating the rank across all sections. As you mentioned you want the rank per section you just need to adjust the way the quick table calc is working. To do this right click on the measure and select edit table calc. Under Compute using you can change the way the calc is working. Select a couple of different ones to see what is happening. As you have structured the workbook to have Section and then Customer on the Rows shelf you should be able to use pane across then down. This means that it will calculate the rank per pane which in this case is per Section and will calculate down across Customer.
8) You can now drag this measure onto the filters pane and select a range of 1-3 this will filter the view to only show the top 3.
This method will work dynamically even when the data is updated :)

Graph based on the user filter selection

On a tableau dashboard there are 2 filters and a bar graph.
The filters are 1. to select top or bottom customers
2. how many ex:5,10,15 etc
when the user selects top and 5 in the respective filters then top5 customers have to show in the bar graph.
if the user selects bottom ,10 in the respective filters then bottom 10 customers have to shown in the graph.
how to achieve this when the data contains only customers details and their billing amount ?
Instead of filter, you can go with the Parameter for getting the result. I have done the top and bottom multiple times in many of the tableau visualizations and its so easy.
Below are the steps to achieve your requirement.
Create a parameter that will allow you to select top and bottom
Create another parameter that will allow you to select the desired numbers like 5, 10, 15 etc.
Here i have created a parameter that will have values from 10 to 50 in a step size of 10.
Create a calculated field that will subset data based on the parameters chosen
In the above screenshot, I am using the top site parameter and creating a conditional statement that will show the states based on the value chosen in the site parameter and the value for that state.
Put the calculated field in the filter and select show and click ok in the filter box.
Now the view will show the top count based on the value selected in the parameter.
Please note the calculation is for top N and for bottom N you need to change the calculation.
Hope this will help you. I can provide you a workbook if you need.

Create Actions From Tableau Map (with points)

I am familiar with how to create actions in Tableau, but doing so with map points has stumped me. It seems as though Tableau uses the lat/long measures uniquely and different than how it would another measure.
The expected behavior I want is a user to be able to select a single map point from a Tableau sheet so I can use that selection to drive an action (in this case adding the selection to a separate, blank sheet).
Here is one workaround, but this isn't a stable solution for the end-user:
1) Find desired map point -> right-click -> keep only
2) From the new 'Inclusion' pill that appears under 'Filters'...right-click -> apply to worksheets -> selected worksheets -> choose sheet
Thanks, Vamsi. I solved this morning a bit differently, it was actually really easy and didn't require any calculations:
Used carrot on my map's toolbar to 'Use as filter.'
Added a hidden crosstab to the same dashboard that, of course, changed to show the chosen map point.
Used that sheet to power my other calculation.
Essentially, I had to have both sheets on the same dashboard which allowed 'Use as filter' to solve my challenge.
(A) As each map point (generated lat/long value) is linked to a specific set of Geographic dimensions, you can create an index/combination of these fields as a calculated field.
For example, if the fields "City", "State" are the geographic dimensions, create a calculated field
Index = [City] + ", " + [State]
After you create an Action filter from the map to the desired blank sheet, at the bottom of the "Add filter Action" window use "Selected fields" under Target filters and click Add filter. In the pop-up, select the recently created Index field for filtering.
(B) You can also just add the City and State fields separately into the "Selected fields" in the Action filter and not have to create the Index altogether.
In both ways, even if there are multiple rows of data for the same location on the map, the result would show all those rows.

How do I group slices in my Crystal Report pie chart?

I am trying to display a pie chart that shows sales by company. However there are a lot of companies that only have a tiny sales which makes the pie chart look rubbish.
Is there a way to group companies like this into a single "Other" category?
Chart Expert -> Data then select your "on change of" field then click the TopN button. From here you can specify what to do with the smaller amounts. I usually group together the bottom 5% into an "other" group.
You could always make two pie charts from your data - one showing the main players and the other showing a blow-up of your smaller company data.