Forum Discussion

RichOB's avatar
RichOB
Post Partisan
1 year ago
Solved

Count based on date

Hi, how can I get the total count of properties that have an expiry date within each financial year? My financial year runs 1st April - 31st March. I make it:

 

FY 24/25 = 4

FY 25/26 = 6

 

Property_IDIssue_DateExpiry Date
1 Lakeshore Drive12/08/202312/08/2024
1 Lakeshore Drive12/08/202412/08/2025
2 Logan Square07/07/202307/07/2024
2 Logan Square10/07/202407/07/2025
5 Giddings St01/02/202401/02/2025
6 Addison13/06/202413/06/2025
7 Ravenswood Ave02/08/202402/08/2025
1 Davies Road01/06/202401/06/2025
8 Winnemac Park08/08/202308/08/2024
8 Winnemac Park08/08/202408/08/2025
  • RichOB 

     

    Hi there, assuming you do not use Date table and you are going to use the Expiry Date in this sample table. You'd need to create one Column with DAX below for FY. 

    Financial Year = 
    VAR Expiry = 'CountBasedOnDate'[Expiry Date]
    VAR FY_EndYear = YEAR(Expiry) + IF(MONTH(Expiry) >= 4, 1, 0)
    RETURN 
    "FY " & RIGHT(FY_EndYear - 1, 2) & "/" & RIGHT(FY_EndYear, 2)

    In reporting, it will be, 

    Hope it helps:)

     

     

5 Replies

  • RichOB 

     

    Hi there, assuming you do not use Date table and you are going to use the Expiry Date in this sample table. You'd need to create one Column with DAX below for FY. 

    Financial Year = 
    VAR Expiry = 'CountBasedOnDate'[Expiry Date]
    VAR FY_EndYear = YEAR(Expiry) + IF(MONTH(Expiry) >= 4, 1, 0)
    RETURN 
    "FY " & RIGHT(FY_EndYear - 1, 2) & "/" & RIGHT(FY_EndYear, 2)

    In reporting, it will be, 

    Hope it helps:)

     

     

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

    Hi RichOB ,

    Thank you for reaching out to Microsoft Fabric Community.

    Thank you MasonMA Greg_Deckler for the prompt response.

    I wanted to check if you had the opportunity to review the information provided and resolve the issue..?Please let us know if you need any further assistance.We are happy to help.

    Thank you.

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

    Hi RichOB ,

    May I ask if you have resolved this issue? Please let us know if you have any further issues, we are happy to help.

    Thank you.

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

    Hi RichOB ,

    I hope the information provided is helpful.I wanted to check whether you were able to resolve the issue with the provided solutions.Please let us know if you need any further assistance.

    Thank you.