Forum Discussion

RichOB's avatar
RichOB
Icon for Post Partisan rankPost 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   Pr...
  • MasonMA's avatar
    1 year ago

    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:)