How do I count the number of days a project is in the same status?
I collect the below data for multiple Clients, Project IDs, and Statuses. I want to be able to count the number of days that each project is in the same status. How do I do this with either a script or set analysis? The below data shows the statuses over time, but I only need to know how many days each project has been in the last status. In the below example calc I subtracted the dates 23-Apr-16 and 15-Apr-16 to get 18 days. I generated the below straight table using the Aggr function in the Expression.
Re: How do I count the number of days a project is in the same status?
I'm assuming a project can only have 1 status per day?
Unless your data volume is huge, you shouldn't have to take this logic to the script. What are the dimensions of the chart that you want to display this expression in? In the above example, you included Status and Date as dimensions, but I'm assuming that wouldn't be what you'd actually want? Assuming your only dimensions would be Client, Project ID, and Supplier, your expression would look this like: