Hi,
There are 2 objectives I'd like to achieve but I'm not quite sure how to go about it:
Dataset:
Project | Status | Created On | Period |
A | Good | 1/1/15 1:00PM | 1/1/15 |
B | Good | 1/1/15 2:00PM | 1/1/15 |
A | Ok | 2/1/15 1:00PM | 2/1/15 |
A | Ok | 5/1/15 3:56PM | 5/1/15 |
B | Ok | 2/1/15 2:00PM | 2/1/15 |
A | Ok | 3/1/15 4:00PM | 3/1/15 |
A | Bad | 2/1/15 5:00PM | 2/1/15 |
A | Ok | 4/1/15 2:00PM | 4/1/15 |
A | Good | 3/1/15 1:00PM | 3/1/15 |
A | Bad | 3/1/15 2:00PM | 3/1/15 |
Desired Output:
Project | Status | Created On | Period | Consecutively Ok |
A | Good | 1/1/15 1:00PM | 1/1/15 | 3 |
B | Good | 1/1/15 2:00PM | 1/1/15 | 1 |
A | Ok | 5/1/15 3:56PM | 5/1/15 | 3 |
B | Ok | 2/1/15 2:00PM | 2/1/15 | 1 |
A | Ok | 3/1/15 3:00PM | 3/1/15 | 3 |
A | Bad | 2/1/15 5:00PM | 2/1/15 | 3 |
A | Ok | 4/1/15 2:00PM | 4/1/15 | 3 |
Thanks
Solved! Go to Solution.
HM,
i still dont understand the 2nd logic for COunt
can explain little more Please?
Hi
For Part 1, i just sorted it desending for Created on, the used Unique for Project and Period, finally Sorted again Created on Ascending
for Part 2, I used a formula tool to create Flags field ie one field for Project=A and Status= Ok, this takes value 1 if true and 0 otherwise. Similarly i created another flag field for Project=B and Stauts =0.Next I attacjhed a Running total tool grouped by Project on both the flag fileds. Finally i summarised with group by as Project and Max for both flag fields. This will give you the max times 'ok' occurs consecutively for each project. from here you can append it to the main data.
Let me know if this makes sense, else ill attach the workflow as well.
Correction, Status="ok"
I've attached a workflow that generates a "Project Status Summary" based on the input: it lists a project, status, and days in that status. Browse-tool output looks like:
What's nice about this is that we can tell at a glance how little time was spent in "bad" project status. But otherwise, understood it isn't exactly what you asked for.
Thank you all for attempting to assist me with my problem - it's greatly appreciated.
Allow me to describe it in a different format:
1/1/15 | 2/1/15 | 3/1/15 | 4/1/15 | 5/1/15 | |
Project A | Ok | Bad | Ok | Ok | Ok |
I hope that clarifies things a bit more but please feel free to ask more questions if it's still confusing.
Thanks
Thank you so much! The solution is perfect :)