Forum Discussion

Amos_Lim's avatar
Amos_Lim
Resolver I
2 years ago

Comparison Between Current with Previous Month

My table contains the individual month records that include Measure Date/Time, C-No, A-Set, Height-A/B, Thickness-A/B,

Gradient-A/B, P and R Date.

I would like to calculate and compare data between the current and the previous month, based on the following conditions:

  1. When C-No and A-set match.
  2. When C-No & A-set repeat within a single month, consider only the data from the most recent occurrence for the calculations. For instance, if the same C-No and A-set are recorded on both January 4th and January 20th, use only the data from January 20th for calculations.
  3. Perform calculations (Height-A, Height-B, Thickness-A, Thickness-B, Gradient-A, and Gradient-B) current month's data minus the previous month's data, only if the P OR R-Date is falls outside the dates of the current and previous month, display "Nil." if no calculation is happened.

Refer to the attached files, the samples for both PB and Excel.

 

Sample Files 

Thanks for the help.

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Amos_Lim 

     

    Please present your example data and desired results in excel format. So that we can help you better. Please remove any sensitive data in advance.

     

    Best Regards,
    Yulia Xu

    • Amos_Lim's avatar
      Amos_Lim
      Resolver I

      Please find a sample file attached.

      It compares January to February.

      The comparisons between February and March, March and April, and so on are identical.

       

      Sample File