I've been searching it for a longer while and still have no answer.
I would like to automate creation of a set of queries for the dashboard relevant to the particular quarter. Currently, queries are copied-pasted every quarter with updated iteration path under eg xx\2022 Q4, and the structure is as follows
2022 Q3
Sprint 1
Sprint 2
Sprint 3
Sprint 4
2022 Q4
Sprint 1
Sprint 2
Sprint 3
Sprint 4
I wanted to use #CurrentIteration, yet the problem is that then the query pulls out the results only of the current sprint instead of the whole quarter.
Is there any way to address the parent of #CurrentIteration in the query (so 2022 Q4 in this case instead of only Sprint 1) that would be automatically updated every quarter?
According to your description, I did some research and test, the #CurrentIteration and there is currently no option to set it to parent level (2022 Q4) to include the entire quarter.
Maybe you could try to create a sliding window of your team's iterations query to check if it meet you requirements.
If not, you could use "Request a feature" on the left side of Developer Community to open a new suggestion ticket.
Related
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.
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.
I have a table that lists players of a game and the history of their level changes within the game (beginner, intermediate, advanced, elite, pro). I am trying to build a query that will accurately identify people who reached a level of advanced or higher for the first time so far in 2021 (it is possible for players to skip ranks, so I want the earliest date that they reached either he advanced, elite, or pro levels). I'm currently using this query:
SELECT *
FROM (
SELECT p."ID", ra."NewRank", MIN(ra."EffectiveDate") AS "first_time_adv"
FROM rankachievement ra
JOIN player p
ON ra."ID" = p."ID"
WHERE ra."NewRank" IN ('Advanced',
'Elite',
'Pro')
GROUP BY 1, 2) AS t
WHERE t."first_time_adv" > '1/1/2021'
ORDER BY 1
Right now, this is pulling in all of the people who reached the advanced level for the first time in 2021, but it is also pulling in some people that had previously reached advanced in 2020 and have now achieved an even higher level- I don't want to include these people, which is why I had used MIN with the date.
For example, it is correctly pulling in Players 1 and 2, who both reached advanced on January 2nd, and player 4, who reached elite on January 4th after skipping over the advanced level (went straight from intermediate to elite). But it is also pulling in Player 3, who reached advanced on December 30th, 2020 and then reached elite on January 10th- I do not want player 3 to be included because they reached advanced for the first time before 2021. How can I get my query to exclude people like this?
You're getting two results for Player 3... one with the advanced and one with the elite because you're grouping by NewRank. The one where Player 3 reached advanced gets removed from the result set by your WHERE t.first_time_adv > '1/1/2021' and the elite passes through. I suggest trying to use a FILTER and OVER with MIN().
Your results from the inner query include something like this:
id | new_rank | MIN(EffectiveDate)
---+----------+-------------------
1 | advanced | the min date for this record (12/30/2020)
1 | elite | the min date for this record (01/10/2021)
This is because you're getting the MIN while grouping both ID AND NewRank. You want the MIN over ALL records of that player. If you grouped by only ID you might get the behavior you were looking for but that would require you to remove the NewRank from the SELECT clause.
I suspect you want the rank in your final result set so try something like this:
WITH data AS
(
SELECT p."ID"
, ra."NewRank"
, ra."EffectiveDate"
, MIN(ra."EffectiveDate")
FILTER (WHERE ra."NewRank" = 'Advanced')
OVER (PARTITION BY p."ID") AS "first_time_adv"
FROM rankachievement ra
JOIN player p ON ra."ID" = p."ID"
WHERE ra."NewRank" IN ('Advanced', 'Elite', 'Pro')
)
SELECT *
FROM data d
WHERE d."first_time_adv" > '1/1/2021'
ORDER BY 1
;
Previously you were finding the MIN(EffectiveDate) for any rank IN ('Advanced', 'Elite', 'Pro')... now you're truly finding the EffectiveDate for when a player reached 'Advanced'.
The dashboard in the linked workbook shows a table with sales split by year on the top. Below, there's a table with the rolling average of the last 4 weeks, including the current. It's set to show NULL if there are not enough data points. I'd like for it to compute the first January 2018 value based on the current week and 3 full weeks from the end of 2017. Carrying that concept forward, all NULLs from 2018 onward will be eliminated. The NULLs for the first 5 weeks of 2017 will be the only NULL values. The average should always be computed on a full 4 weeks (28 days) even when week 53 doesn't contain 7 days.
How can I write a calculation to achieve what's described above?
I've tried putting the WINDOW_AVG function inside a LOD, but that's not allowed. Furthermore, I've also tried using FIXED and even FIXED inside WINDOW_AVG.
Here's one of my attempts:
{FIXED [Week_int]:
WINDOW_AVG(SUM([Sales]), -4, 0)
}
It returns this error: "Error: Level of detail expressions cannot contain table calculations or the ATTR function"
Here's the data structure. It includes one value of Sales per day.
Basically I created a dummy data in Excel by creating dates (from 1-1-2017 to 2-2-2021) and filling some random values (unif dist *5000) against these.
I added Week[date] to columns and year[date] to rows as in your screenshot. I added sum(value) on the text marks card.
Thereafter, I added table calculation --> Moving average --> edited it for previous 4 values , next 0 values, (check current value if you want to include current record), then check Null if there are not enough values. (your requirement). --> click compute using -Specific Dimensions change the order of fields below - drag Year above than week (table across then down will also create the same view)
You should be able to get a view as desired.
Regarding your query on number of days in the week, Tableau caters it automatically if you have chosen it datepart.
Edit I verified this in Excel, the method is correctly working.
See, the average of first 28 values in Excel
and the view built in tableau:
Here's the corrected dashboard hosted on Tableau Public.
I'm trying to write a backlog report in Crystal Reports XI attached to Fluke Met/Track database (Sybase back-end)
I have it running between a start & end date, then grouped by Month and then Day.
I need it to show all of the units that were in the lab on the days between the start & end dates
October Units
2
22525
22526
3
22525
22526
22527
4
22526
22527
22530
The order of the units doesn't matter, just that the units are showing up.
Maybe I'm just having a rough day, but I'm not seeing how this can be accomplished.
You can accomplish this by adding a group for your date, opening up the Group Expert, click your Group click Options, then you should see something along the lines of "The section will be printed:" and you can select: for each day.. This should allow grouping for each day.