Forum Discussion
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
I have a Next Year Column but when I combine them everything after the "-" is 05?
- Anonymous3 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] & "-" & trimmedYou could replace 'Date'[Year] +1 with the column 'Date'[Next Year] if that is the end year of each financial year
4 Replies
- AnonymousNot applicable
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] & "-" & trimmedYou could replace 'Date'[Year] +1 with the column 'Date'[Next Year] if that is the end year of each financial year
- ArchStantonPower Participant
Brilliant, many thanks for this!!
- SykResident Rockstar
You can just get the last 2 digits from your next year column.
Fin Year = 'Date'[Year] & "-" & RIGHT(YEAR('Date'[Next Year]),2)- ArchStantonPower Participant
thanks but that gives me the 05 problem i described in the original message. The VAR option below works though - thanks for responding!