Forum Discussion

JayTG123's avatar
JayTG123
Advocate I
4 years ago
Solved

Create new column for Fiscal Year

Hi all,   I have the following data in Power Bi  - I have seperated the three columns up individually however I wish to create a new year column that will display the year like 2021/22 (UK Financia...
  • Nathaniel_C's avatar
    4 years ago

    Hi JayTG123 ,
    Go to Power Query, select Conditional Column, insert the code:

    if [Offense date.2] >= 4 then Text.Combine({Text.From([Offense date.3]),Text.From([Offense date.3]+1-2000)},"/") else Text.Combine({Text.From([Offense date.3]-1),Text.From([Offense date.3]-2000)},"/")


    Pics to follow.


    Let me know if you have any questions.

    If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos πŸ‘are nice too.
    Nathaniel