How to set up a dashboard action filter to show only those records in sheet B that contain the current selection in sheet A? - tableau-api

First time poster here. I am putting together a dashboard to show progress of a number of projects which all contain a given set of milestones.
I put together two charts, a 'milestone overview' which shows a count of project_id by milestone achieved (blue) or not yet achieved (grey), and a 'gantt chart' which shows timeline of these milestones for each project_id see milestone and gantt dashboard. All projects should contain all of the milestones but it's not always the case.
I would now like to apply dashboard action to filter the 'gantt chart' and only show projects which contain the selected milestone in the 'milestone overview' and where that milestone has been achieved (or not achieved depending on the selection), but preserve the appearance. Esentially I need to pass project_id from 'milestone overview' to the 'gantt chart', see desired result filtered gantt
Currently, the only common dimension is activity_id (milestone) so when I use this to filter the gantt, the correct projects are shown, but all other milestones are excluded from the view and the gantt breaks see this image
I've tried adding project_id to the details shelf in the 'milestone overview' chart but it then fragments the chart see fragmanted milestone chart
I then tried pushing it to the secondary axis (to sit behind the aggregated chart) but dashboard actions ignore it because then only to aggregated chart from first axis can be selected.
I also posted un Tableau community forums here with a sample workbook, but haven't yet had any responses. Any suggestions?
Thanks

I think you just need to place a filter for the Activity ID on your Gantt chart Worksheet, like this:
When you go to the Dashboard, the action filter should filter like this:
I can send you back the workbook if you like.

FYI please see the response provided by Yuri in Tableau community forums. Basically this is a one-click solution with Set Actions in the new 2018.3 version. For those in older versions, provided is a two-click solution (snapshot added). I'm not fully clear on why this works given there are no common fields between 'show projects' and 'milestone overview' sheets, yet the dashboard action still goes through without the 'missing fields on sheet...' error. Anyway, it's the best alternative to set actions.snapshot of the solution provided

Related

Azure Devops Dashboards - How to chart the trend of query results over time based on work item history?

I want to be able to generate a stacked bar chart based on the results of a query, for example the number of open bugs and open features. I would like to see the resulting number of open bugs vs features from that query over a time period, for example the last 30 days. Specifically the number of bugs vs features that were open on that particular day, regardless of their current status. Is there a way to do this using an existing out of the box widget? I believe it should be possible to figure out this information using the history. Alternatively, is it possible to simply store the totals from the query somewhere in devops and then chart it? Or would I need to write a script to export the query results via the api and then use something like the power bi widget to chart it?
Sure, you can set up a chart of the query about the bugs and features opened in the last 30 days.
To meet this demand, you can do like as the steps below:
Set up a query with the following filter clauses. Save this query to the Shared Queries folder.
Work Item Type In Bug,Feature
State = [Any]
Created Date >= #StartOfDay('-30d')
On the Charts tab of the new query, create a new chart for the query like as below.
After saving the chart, add this chart to a specified dashboard in the project.
After above steps, navigate to the specified dashboard in the project, you can see the chart on the dashboard.
[UPDATE]
According to your latest reply, you want to get the Bug and Feature that were open state in the last 30 days. For these work items, we can think they satisfy one of the following conditions:
The work items were closed in the last 30 days, no matter what date they were created.
The work items are still open state currently. They do not have the closed date yet.
So, set up the query like as below should be able to match these work items.
Work Item Type In Bug,Feature
And State = [Any]
And Closed Date >= #StartOfDay('-30d')
Or Closed Date =
Group the last two clauses.
Then create the chart for the query.
Maybe the stacked chart would go some way to answering your problem.
https://learn.microsoft.com/en-us/azure/devops/report/dashboards/charts?toc=%2Fazure%2Fdevops%2Fboards%2Ftoc.json&bc=%2Fazure%2Fdevops%2Fboards%2Fbreadcrumb%2Ftoc.json&view=azure-devops#add-a-trend-chart
That produces charts with date as the x axis which, I think, is what you're looking for.

In Grafana, how to build a data link to filter current dashboard when there is more than one variable?

I'm using Grafana v8.3.4 (a551d74b11)
I've a dashboard with many variables (filters). One of those is for exemple TransactionType.
I would like my charts to filter on click.
For example with a pie chart using TransactionType, I want to filter the TransactionType variable ,when I click in one of the element of the pie chart, by this element.
The closest feature I found is to use data link.
So far I tried in the pie chart the two data link there after.
The syntax is OK but the effect is not doing what i’m expecting.
a)
/d/${__dashboard.uid}/${__dashboard}?var-TransactionType=${__series.name}
For this one the data link apply the filter on TransactionType but clear all the other filters variables, even clear the All, so the dashboard is in error.
b)
/d/${__dashboard.uid}/${__dashboard}?${__all_variables}&var-TransactionType=${__series.name}
this one apply all filters first then add the TransactionType filter but, it keep the previous All value, so the filter become All + value, that don’t work, the dashboard is in error too.
==> Is there a way to keep all the existing variable filter unchanged and replace the value for one variable filter ?
move var-TransactionType=${__series.name} before ${__all_variables}

Azure DevOps Server Pie chart slice not filtering

I have a Pie chart as follows:
It has slices representing count of Work Items by State. When I click a slice, I'm taken tot he query result showing all work items instead of filtered to clicked state:
Here is the query:
What do I have to change here to get a filtered result instead of all?
You can use the "Filter work item" option in the top right corner to filter the status of work items.
As of this time, however, clicking on a slice and then displaying work items of that status is not supported. When you click on the chart, you essentially open the query used by the chart.
So you need to manually filter your desired status after clicking. In addition to status, it also supports filtering of information such as Assigned to, Tags, and so on.

Showing comparison across groups in tooltip Tableau

I have a dashboard that lets users compare a company selected from a drop down menu (Company A) to another company chosen from another drop down menu (Company B). This then displays stacked bar charts (5 categories) by year. I want to build a tooltip so that when the user hovers over one of the 5 categories in either set of bar charts, it shows a comparison of that category between Company A and Company B. Is this possible, and if so, what is the best way to do this?
My previous answer showed a different approach for the problem without using too many workarounds. This answer will try to give exactly what has been asked.
First thing to understand is that you can't have the values for two different companies if you're filtering to show only one company. That means you'll need to circumvent this by filtering directly on the field.
Step 1: Create the new parameters that will be used as filters.
You want to create two parameters called "Company 1" and "Company 2" that will be used in each view to filter the company on the graphic.
Step 2: Create the new measures with the filter directly in the field.
Now you should create two new measures from your main measure, each one filtering one of the companies accordingly to the parameter, e.g. Sales Company 1 and Sales Company 2.
Step 3: Create a field with the variation and add it at the tooltip mark.
Simply enough, you want a calculated field with the difference between them:
SUM([Sales C1]) - SUM([Sales C2])
Step 4: Update the views and dashboard
Change the measure in each of the views for their following specific measure field, and remove the Company filter. And in the dashboard, substitute your usual filters to the parameter (which will be used to filter both views).
By assuming you have a dashboard with two views, you'll be filtering the [Company] in both of these views, making the value of another company not available to be shown at the tooltip.
If you're not using it yet, you could try a new approach and see the variance between companies by using the Color mark. By adding the [Company] as color, you could turn the Stack Marks off and add the second company in the filter to be able to visualize the difference.

Tableau, color-coded bar chart not working

Public workbook here. Source is Excel file.
I was able to create ordered bar chart based on (1) Location (2) Product
When I drag Above Three into Color, the graph is incorrect, how to troubleshoot?
Update
I made change such that Calculation computers based on Product, Above Three for each Location, at level Product.
However, Morton's still shows error.
The order in Mortons should descend, based on number of records, i.e.
Dark Chocolate
Beer
Toffee
Coffee
Fries
Rest of the Locations are correct, but only Mortons gives out-of-order products
Update2
Calculated Field Calculation3 = Index()
And I filter Calculation3 for 1 to 3, to display top 3 products
If I remove Calculation3 from filter, it gives correct order but it give ALL products, not the top three popular products (per Location).
I updated workbook to illustrate this. Please advise.
I don't know the purpose of the Index() field but that is creating your issue. Remove it from rows and the color appears to work the way you want it.
I hope this is what you are looking for
I have also published the file at the below address. You can take a view on that.
Tableau Wokbook
I achieved it by the following methods.
I changed the Calculation 3 field from Index() to RANK(SUM(NUMBER OF RECORDS)).
The calculation 3 was kept in between Location and period then edited the table calculation of calculation 3 by keeping the Addressing of the edit table calculation, having only the location and product as shown below and then Set the restarting every to Product.
You can check the workbook for more information