Forum Discussion

RichOB's avatar
RichOB
Post Partisan
1 year ago
Solved

Calculating completion % based on expiry dates

Hi, I need some help working this brain teaser out, please.  FYI **Table at bottom. Financial Year runs 1st April - 31st March**

I have a property company with 6 locations, and I conduct a variety of statutory checks. I need to be able to show 2 different calculations in 2 tables:

 

1

Current active figures

Current properties requiring gas certificate = 7

Has a current in-date certificate (an issue date for the next financial year) = 4 

% with current certificate = 57%

 

2

% of properties that obtain a gas certificate late (when the issue date of the new cert is later than the previous expiry date) 

 

FY 22/23 = 1 property due. 1 late = 100% Late

FY 23/24 = 2 properties due. 1 late = 50% late

FY 24/25 = 4 properties due. 2 late = 50% late

FY 25/26 = the 1st calculation can take care of the current financial year % (I think)

 

Property_IDIssue_DateExpiry DateTypeExp_Year
1 Lakeshore Drive02/08/202202/08/2023Gas Safety ChecksFY 23/24
1 Lakeshore Drive12/08/202312/08/2024Gas Safety ChecksFY 24/25
1 Lakeshore Drive12/08/202412/08/2025Gas Safety ChecksFY 25/26
1 Lakeshore Drive18/08/202518/08/2026Gas Safety ChecksFY 26/27
2 Logan Square07/07/202107/07/2022Gas Safety ChecksFY 22/23
2 Logan Square10/07/202207/07/2023Gas Safety ChecksFY 23/24
2 Logan Square07/07/202307/07/2024Gas Safety ChecksFY 24/25
2 Logan Square10/07/202407/07/2025Gas Safety ChecksFY 25/26
5 Giddings St01/02/202401/02/2025Gas Safety ChecksFY 24/25
6 Addison13/06/202413/06/2025Gas Safety ChecksFY 25/26
6 Addison24/06/202524/06/2026Gas Safety ChecksFY 26/27
7 Ravenswood Ave02/08/202402/08/2025Gas Safety ChecksFY 25/26
7 Ravenswood Ave02/08/202502/08/2026Gas Safety ChecksFY 26/27
1 Davies Road01/06/202401/06/2025Gas Safety ChecksFY 25/26
8 Winnemac Park08/08/202308/08/2024Gas Safety ChecksFY 24/25
8 Winnemac Park08/08/202408/08/2025Gas Safety ChecksFY 25/26


I hope this makes sense. Apologies if my calculations are off, but I hope I've portrayed what I need.

 

Thanks

  • RichOB 

    I think I only find 3 ID for the first one.

     

    you can try  this

     

    Measure = DIVIDE(CALCULATE(COUNTROWS('Table'),FILTER('Table','Table'[Expiry Date]>=date(year(today())+1,4,1))),DISTINCTCOUNT('Table'[Property_ID]))
     
     
    for the second one ,you can try to create a column, 
     
    late num =
    var _next=minx(FILTER('Table','Table'[Property_ID]=EARLIER('Table'[Property_ID]) && 'Table'[Issue_Date]>EARLIER('Table'[Issue_Date])),'Table'[Issue_Date])
    return if (_next>'Table'[Expiry Date],1)
     
     
    pls see the attachment below
     
     

8 Replies

  • Pleae clarify better how we can link your examples to the table you attached

     

    It is all a mistery to me

     

    Thanks

     

    1

    Current active figures

    Current properties requiring gas certificate = 7

    Has a current in-date certificate (an issue date for the next financial year) = 4 

    % with current certificate = 57%

     

    2

    % of properties that obtain a gas certificate late (when the issue date of the new cert is later than the previous expiry date) 

     

    FY 22/23 = 1 property due. 1 late = 100% Late

    FY 23/24 = 2 properties due. 1 late = 50% late

    FY 24/25 = 4 properties due. 2 late = 50% late

    FY 25/26 = the 1st calculation can take care of the current financial year % (I think)

     

    • RichOB's avatar
      RichOB
      Post Partisan

      Hi FBergamaschi If we take the year 24/25 for example. 

       

      1 Lakeshore Drive, due 12/08/2024

      The next issue date was 12/08/2024, this means it was completed on time

       

      2 Logan Square, due 07/07/2024

      The next issue date was 10/07/2024, which was completed late as it was more than 1 day later than 07/07/2024

       

      5 Giddings St, due 01/02/2025

      Completed late as there is no next issue date

       

      8 Winnemac Park, due 08/08/2024

      The next issue date is 08/08/2024, completed on time

       

      4 properties had gas safety checks due in 24/25

      2 were late being completed = 50% of properties had late gas safety checks:

      If there is more than 1 day between the expiry date and the next issue date for the same property, it is classed as being completed late.

       

      I hope this helps, please let me know if I can give you any more info.

       

      Thanks

       

  • RichOB 

    not clear about the logic. 

    Has a current in-date certificate (an issue date for the next financial year) = 4 

    what is the period for next year?

     

    and for the second one, how to define properties due?

    • RichOB's avatar
      RichOB
      Post Partisan

      Hi ryan_mayu ,

       

      "Has a current in-date certificate (an issue date for the next financial year) = 4"

      This is for the current financial year running 1st April - 31st March. It takes into consideration the total number of properties that have gas safety checks expiring this year, and the number of properties that have completed them so far.

       

      What is the period for next year?

      Currently in financial year 25/26, next is 26/27

       

      and for the second one, how to define properties due?

      A property is "due" when it reaches the expiry date.

      If the date of the next Issue goes past the previous expiry date it is classed as being late

       

      For example, the certification due on 01/09/2024 was on time as the next one was input the same day, and is now valid for 1 year..

      1 Sacramento Dr01/09/202301/09/2024Gas Safety
      1 Sacramento Dr01/09/202401/09/2025Gas Safety

       

      In this example, the due date for the new certification was 01/09/2024 but the new one was uploaded 11/09/2024, so it's classed as being late. 

      1 Sacramento Dr01/09/202301/09/2024Gas Safety
      1 Sacramento Dr11/09/202401/09/2025Gas Safety

       

      I hope this helps? Please let me know if I can give you any more info

       

      Thanks

       

      • ryan_mayu's avatar
        ryan_mayu
        Super User

        RichOB 

        I think I only find 3 ID for the first one.

         

        you can try  this

         

        Measure = DIVIDE(CALCULATE(COUNTROWS('Table'),FILTER('Table','Table'[Expiry Date]>=date(year(today())+1,4,1))),DISTINCTCOUNT('Table'[Property_ID]))
         
         
        for the second one ,you can try to create a column, 
         
        late num =
        var _next=minx(FILTER('Table','Table'[Property_ID]=EARLIER('Table'[Property_ID]) && 'Table'[Issue_Date]>EARLIER('Table'[Issue_Date])),'Table'[Issue_Date])
        return if (_next>'Table'[Expiry Date],1)
         
         
        pls see the attachment below
         
         
  • v-priyankata's avatar
    v-priyankata
    Community Support

    Hi RichOB 
    FBergamaschi ryan_mayu Thanks for the inputs.

    I hope the information provided by users was helpful. If you still have questions, please don't hesitate to reach out to the community.

    • v-priyankata's avatar
      v-priyankata
      Community Support

      Hi RichOB 

      I wanted to check if you had the opportunity to review the information provided by users. Please feel free to contact us if you have any further questions.

       

      • v-priyankata's avatar
        v-priyankata
        Community Support

        Hi RichOB 

        Hope everything’s going smoothly on your end. We haven’t heard back from you, so I wanted to check if the issue got sorted. if you have any other issues please reach community.