Google Data Studio two set of dates and compare against TODAY - date

I have an extensive database (actually several) showing different dimensions and metrics of projects. For the sake of simplicity, I will use some dummy data to describe my challenge.
Sample data set
https://docs.google.com/spreadsheets/d/e/2PACX-1vRi_Qc3EiDRYfz03S2KYVBHx4wuXdh4yaYCaY1T_HIWBuaR7jeST99UZDSAnmri4WOgM10lQJF9VoCc/pubhtml
Project ID
Project Name
Code
Planned Finish
Actual Finish
Ongoing
Project1
Project#1
337
01.10.2022
13.12.2022
Y
Project1
Project#1
338
03.10.2022
14.12.2022
Y
Project1
Project#1
339
04.10.2022
15.12.2022
Y
Project2
Project#2
370
01.05.2017
01.05.2017
N
Project2
Project#2
371
22.06.2018
30.03.2018
N
Project2
Project#2
A1030
30.10.2020
28.10.2020
N
Project2
Project#2
A1040
01.10.2021
N
Project2
Project#2
A1050
28.10.2021
N
Project3
Project#3
404
26.09.2016
29.08.2016
N
Project3
Project#3
405
14.12.2016
31.03.2017
N
Project3
Project#3
A1020
20.03.2023
Y
Expected output
Project
Status
Project1
Ongoing
Project2
Completed
Project3
Ongoing
Chart: Pie chart (preferably)
Goal is to find all ongoing projects in the database. This is achieved by checking Planned Finish or Actual Finish against TODAY and if any date is greater than TODAY, TRUE value is produced.
Issue a) Described works in Google Sheet, but in Data Studio empty date cell from GS is showing as 'null' in DS. If any date value is 'null', TRUE value is always produced (expected behaviour - null is ignored). Possible solution (that I have to verify with data owner) would be use of 'IFNULL' to mirror Planned Finish to Actual Finish if 'null' in Actual Finish.
Issue b) To mitigate issue a, I have tried using NARY_MAX, but this function doesn't accept dates,
Issue c) Results are produced for all sub-projects/phases. How to aggregate results so only main projects (Project1, Project2, etc.) are shown - ref. 2. Expected output?
Google Data Studio report
https://datastudio.google.com/reporting/6e1d666b-0f5b-49a1-a93b-ab071d3d8e1f
In the attached 'Sample data set' table I have a list of 3 projects defined by Project ID and/or Project Name. Each project has corresponding phases defined by Code. Finally, I have two columns with the project finish date - Planned Finish and Actual Finish. What I'm trying to achieve is a chart with the number of ongoing and completed projects.
Of course, there are a few issues with this data set:
a) Project ID is not a unique value, but if needed this can be easily managed with a new value created by combining Project ID and Code.
b) In some cases a date is missing
In Google Sheet I made a column called Ongoing where simple formula =IF(MAX(D2:E2)<TODAY(),"N","Y") is used to check the status for each project phase. From here I can aggregate and finally count Ongoing value against the unique project.
So in the example above Project 1 is still ongoing with all 3 phases ongoing, Project to has been completed because all phases are and Project 3 is still ongoing because at least one phase is still ongoing.
Apology for a bit long description, but in my head, the issue seems complex and I wanted to give it a proper explanation :).
Thanks for any hints.

Related

Data viewer in SSIS not showing all records

I am using SSIS in visual studio for a data analysis task where I am comparing two databases
and trying to identify records that appear in one set and not the other. I have enabled dataviewer to see the details of the records however not all the records appear. For example in the attached image there is a difference of 20 records however only 18 appear. I have pressed the green play button but no more appear. Does anyone have any idea how to fix this?
My first guess would be that you've already clicked the Play symbol and the first 2 rows were displayed although I'm not 100% sold on this explanation as I would expect it to display 18 rows then 2.
Quick attempt at a repro. This should page 4 times
SELECT TOP 25 row_number() OVER (ORDER BY (SELECT NULL)) AS rn
,replicate('x', 4000) AS c2
FROM sys.all_columns
We can observe that total rows are cumulative so the next probable explanation would be an error was generated such that the 2 other rows weren't able to be sent to the Data Viewer.
Without seeing your package, it'll be difficult to reproduce this. Were it me, I'd
Add a Multicast operation before the data viewer. This allows the package to run "normal." Then add a second output to the multicast and route it to a new flat file destination. Run package, get the 20 rows, 18 displayed situation and compare that to the flat file output.

Parallel job is adding extra columns when outputting to a dataset

The last job before my dataset is written is a transformation. It's a lot more complex than this, but the basics are:
input = A Integer, B Integer and C Integer
output = A Integer, if B > 10 then C else 0 -> C Integer
So, to clarify, column A is just passed through and columns B and C are used to perform a transformation that is called "C" in the final output link.
When I examine the columns being written to the dataset I see A and C. I can save the table definition and this is also just columns A and C. However, when I actually run the job, column B also ends up in the dataset, so I end up with (in any order) columns A, B and C.
I've tried deleting my output dataset, then recreating it, giving it a new name, but it always ends up with that "working column" B in it for some reason I don't fully understand. I don't see how it's picking up a column that isn't in the final output link and choosing to add it against my wishes.
I don't want column B in my dataset, it's wasteful to store it and it's confusing for developers as it shouldn't be there in the first place. How do I stop DataStage from writing it?
Seems you have RCP Runtime Column Propagation activated - that will transfor all columns available independend of the specified ones.
Go to the stage (Transformer) - Properties - Output tab and there is a checkbox Runtime Column Propagation - remove the check mark.
In other stages it could be located on the columns tab as well.
In the job properties of your job there is also a setting which will enable RCP for new links - remove this mark as well to avaoid this problems for future job extensions.
For more details on RCP check out this.

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.

Netsted Grouping in Freemarker Netsuite Advance PDF

I have read this article
How to properly group records when executing a <#list>
about Grouping. I do not understand the last word that we can use the grouping at 2 or 3 levels.
How can I achieve 2 or 3 level grouping in Advance PDF in netsuite using Freemarker?
Here is example
Project A
Project Task 1 Total Qty Total Hrs
Project Task 2 Total Qty Total Hrs
Project B
Project Task 1
Project C
Project Task 2
Project Task 3
A project has task and same task can be part of the parent project. Can someone help me grouping and then printing respective details
Or how to filter by one group, print its detail then go to next group etc.
There is no direct approach to do this, you can first form your data in json format the result you want to show, save that json on a custom field and then you can read that json in adv pdf template.

Lookup DB value from anouther table and change slightly

I am trying to create a job management system using FileMaker Pro 14 advanced and FM Starting Point 4.6.
I have only just started looking at it so am pretty much a noob with it. Basically FM Starting Point has Projects and Estimates, Each Project can have multiple Estimates. What I have done is set it so that you have to assign a Project to a Estimate before it will save. I have used the Looked-up value in the database management to fill the Estimate ID with The Project ID that has been assigned.
Project numbers start with an A and 6 digits so for example A120000. What I want to do is change the A to a Q when the Project ID is set as Estimate ID.
Can any one point me towards the right methods.
Have a look at calculated fields. I would probably have one field for the digits and one for the flag, then concatenate these in a calculated field for display.
Then set up a script that triggers on change in a field, which sets the flag to the other value.
More info about calculated fields: http://www.filemaker.com/help/12/fmp/html/create_db.8.17.html
More info about script triggers: http://www.filemaker.com/help/13/fmp/en/html/create_layout.9.61.html