Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Maite_CA
Contributor
Contributor

How to verify sequential steps are chronologically ordered

Hello, 

I have an excel file with activities decomposed in sequential Phases and the Planned End Dates for each one of those phases. I am trying now to implement some KPIs in Qlik Sense that allows me tracking the activities easier, with a Master Schedule view using a Pivot Table. 

My data is something like this: 

Activity KeyActivity NamePhaseStatusPlanned END dates
ACT_0001ACT_0001: ElectronicP0Delivered21/06/2019
ACT_0001ACT_0001: ElectronicP1Delivered20/12/2019
ACT_0001ACT_0001: ElectronicP2Delivered16/08/2019
ACT_0001ACT_0001: ElectronicP3Delivered20/12/2019
ACT_0002ACT_0002: ElectricalP0Delivered31/12/2018
ACT_0002ACT_0002: ElectricalP1Delivered01/02/2019
ACT_0002ACT_0002: ElectricalP2Delivered01/03/2019
ACT_0002ACT_0002: ElectricalP3Late18/12/2020
ACT_0002ACT_0002: ElectricalP4Late18/12/2020
ACT_0002ACT_0002: ElectricalP5Late18/12/2020
ACT_0002ACT_0002: ElectricalP6Delivered27/11/2020
ACT_0003ACT_0003: StructureP0Delivered04/10/2019
ACT_0003ACT_0003: StructureP1Delivered12/02/2020
ACT_0003ACT_0003: StructureP2Delivered04/10/2019
ACT_0003ACT_0003: StructureP3Delivered06/11/2020
ACT_0004ACT_0004: SystemsP0Delivered19/04/2019
ACT_0004ACT_0004: SystemsP1Late18/12/2020
ACT_0004ACT_0004: SystemsP2In progress29/01/2021
ACT_0004ACT_0004: SystemsP3In progress29/01/2021
ACT_0004ACT_0004: SystemsP4In progress29/01/2021
ACT_0004ACT_0004: SystemsP5Late15/12/2019

 

As you can see in the table, one of the problems I find is that people can write the date that they want, and sometimes they forget to actualize the date for the next Phases when they modify one of them. That creates incongruencies in the data as they can't deliver a phase if they don't deliver first the precedent one. 

I have tried to create a new dimension to verify that the Planned End dates are chronologically order for the different phases of an activity but I haven't found the way. Could you help me please? 

Thank you in advance,

Maite_CA

 

Labels (3)
1 Reply
ArnadoSandoval
Specialist II
Specialist II

Hi @Maite_CA 

I wrote the attached application (z_Verify_Seq.qvf) that verifies the sequence of the sample data you provided, I think it will help you to identify those records out of sequence, the screenshot below shows the offending records in your scheduled highlighted in yellow

Verifiy_Seq_01.png

You may notice two new fields, Seq and Phase_Seq,  the script creates them implementing the Autonumber - script function ; The first field Seq is the Autonumber of the [Planned END dates] field on the [Activity Key] field, after ordering (sorting) the data by [Activity Key][Planned END dates];  for the second field Phase_Seq, I orders the data by [Activity Key] + Phase, then I applied Autonumber of the Phase fields on the 'P-' & [Activity Key] field; with the second Autonumber I used the trick of adding a text prefix (P-) to the [Activity Key] so Qlik creates a different sequence numbers, this way Seq and Phase_Seq are 1 base sequences driven by the [Activity Key].

Perhaps the script could be improved because it creates 4 temporary tables for the activities, due to the required sorts and I did not want to mix the Autonumber with the Order By, although it may be possible to have them together.

Please, let us know if this approach resolve your problem. 

Arnaldo Sandoval
A journey of a thousand miles begins with a single step.