Forum Discussion

ArchStanton's avatar
ArchStanton
Icon for Power Participant rankPower Participant
4 years ago
Solved

Date Formatting

Hi,   I want to have my Financial Year formatted like this = 2022-23 instead of 2022-2023   I currently have it like this in my date table = 'Date'[Year] & "-" & 'Date'[Next Year] = 2022-2023   ...
  • Anonymous's avatar
    Anonymous
    4 years ago

    Assuming 'Date'[Year] is the start year of the financial year this would work.

     

    FY new =
    VAR trimmed =
        RIGHT ( 'Date'[Year] + 1, 2 )
    RETURN
        'Date'[Year] & "-" & trimmed

     

     You could replace 'Date'[Year] +1 with the column 'Date'[Next Year] if that is the end year of each financial year