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

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.

Related

Azure Devops query - Group by month

I'd like to create a query which shows the bugs created during the last 12 weeks grouped by each month, but I can't manage.
I have created a query that shows the number of bugs created each day (by date) but can't find a way aggregate them for each month.
Also tried doing it by the chart (Dashboard) but didn't manage as well.
The goal is to show whether the number of bugs gets lower or higher across the last 12 weeks.
Thanks
There’s no built-in feature that an help group by month in query.
In Dashboard, you could choose to use Burndown/Burnup chart in Dashboard that may meet your requirment. In the configuration, you can add field criteria to limit the work items that appear in the chart. You can set Plot interval to Months. If you select Months, then burndown/burnup is calculated based on the last day of each month.
You could refer to the official page: Configure a Burndown or Burnup widget for more details.

Dynamic Reporting Day in Tableau Dashboard

I have been trying my hands on something in Tableau and finding it hard to implement. I have attached my sample workbook and the data source I am using from excel. The second tab in Excel shows the final dashboards I want to see as the end result; the first of which I have accomplished in Tableau using the desktop version.
There are 5 kinds of products for which the quality runs happen at different times. My goal is to return the 'Result' of the product based on the latest available 'Quality Run Time' which is 29th March 2018. I got to this part using two calculated fields below:
{FIXED [Product] : MAX([Quality Run Time])} as 'Max_Date'
IF [Quality Run Time] = [Max_Date] THEN [Result] END as 'Max_Result'
The result of this is in the workbook. The problem is I want a dynamic 'Reporting Period' filter for the user to be able to choose from available dates in the 'Quality Run Time.' For example if I wanted to run a report for 27th March 2018, based on the logic I should see the dashboard below (ex from Tab 2 in Excel). I am guessing my calculated fields need to be dynamic somehow and I have tried many different options but it hasn't worked yet.
Please pickup data source and workbook from here
Your logic doesn't work as expected.
You need to create a parameter with datatype DATE and then use that in filter.
I have changed the report and attached in the same link.
I have changed in Tableau version 10.5
Edit---------------------------------------------------
Updated with v10.4 in same link

How to write the queries in power bi

I am using Power BI in my current project for making charts. My data source is Azure SQL database.
I would like a table chart to display today and yesterday data only, for which i used advanced filtering by setting the filter to today and yesterday dates. However, I want to be able to open my report tomorrow and see charts use data from tomorrow and today respectively.
With advanced filtering the charts appear static, not dynamic.
It would be good if someone could explain how to write queries in Power BI on my tables.
You could either
1) modify your sql query to only return today and yesterday data
or
2) add a calculated boolean column, something along the lines of
"IsCurrent = IF(AND(DATEVALUE(Table1[Date])<=TODAY() , 1.0*(DATEVALUE(Table1[Date])-TODAY())<=2),True,False)"
Then filter by IsCurrent.
Using the SDK you can apply filter(s) dynamically to the report. This allows you to simulate the user filtering the report data to the current day and yesterday.
Your client app would compute the correct filter data values and apply it to the report. Using something like report.setFilters(filters)
See this related question for more information about filters:
Power BI Embed URL-multiple filters

Charts drill down as 'year to months for different cities' in Tableau

I'm working on Tableau for rainfall data.
I have a cumulative rainfall data for a year (and the months respectively) of different cities.
And I prepared a tableau barchart for the annual rainfall data.
So, if I hover/click my cursor on any of the bar then a line chart which carries the months of that particular city need to be visualized.
Please suggest.
You have to using compulsory Action Filter.
choose dashboard menu -> Action->add action.
Create another worksheet with the line chart month view you would like to see.
Then go to Worksheet>Actions>
Add Action > Filter and Select how you want it to run (hover/select)
Select your new worksheet as the target sheet
Target filters on the year which displays the months you want in the new view
You might need to mess around with these setting to get it how you want exactly but an action is the way to go.

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.