Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Trying to add a column using power query to label fiscal years as FY1, FY2, etc. but when the start date and end dates are in the middle of the month. Example: 9/25/2023-9/24/2024 is FY1
Solved! Go to Solution.
Table.AddColumn(TableName, "FiscalYearLabel", each
if [StartDate] >= #date(2023,9, 25 ) && [EndDate] <= #date(2024,9,24 ) then
"FY1" else ""
)
Incase if your financial year calculation invlolves any logic then please share it here to help you better.
For example if your financial year depends on current year then
let
Source = Excel.CurrentWorkbook(){[Name="YourTableName"]}[Content],
FiscalStartFY1 = #date(2023, 9, 25),
AddFY = Table.AddColumn(Source, "FiscalYearLabel", each
let
CurrentDate = [YourDateColumn],
FiscalYearNumber = Number.IntegerDivide(Duration.Days(CurrentDate - FiscalStartFY1), 365) + 1
in
"FY" & Text.From(FiscalYearNumber)
)
in
AddFY
Need a Power BI Consultation? Hire me on Upwork
Connect on LinkedIn
|
Hi @Thag
It's been a while since I heard back from you and I wanted to follow up. Have you had a chance to try the solutions that have been offered?
If the issue has been resolved, can you mark the post as resolved? If you're still experiencing challenges, please feel free to let us know and we'll be happy to continue to help!
Looking forward to your reply!
Best Regards,
Community Support Team _ C Srikanth.
Hi @Thag
We haven't heard from you since last response and just wanted to check whether the solution provided has worked for you. If yes, please Accept as Solution to help others benefit in the community.
Thank you.
If the above information is helpful, please give us Kudos and mark the response as Accepted as solution.
Best Regards,
Community Support Team _ C Srikanth.
Hi @Thag
Thank you for being part of the Microsoft Fabric Community.
As highlighted by @tharunkumarRTK , the proposed approach appears to effectively address your requirements. Could you please confirm if your issue has been resolved?
If you are still facing any challenges, kindly provide further details, and we will be happy to assist you.
Best Regards,
Community Support Team _ C Srikanth.
Hi @Thag
but when the start date and end dates are in the middle of the month? Your statement seems to be lacking. can you please give us a full example? What about for the other dates?
Table.AddColumn(TableName, "FiscalYearLabel", each
if [StartDate] >= #date(2023,9, 25 ) && [EndDate] <= #date(2024,9,24 ) then
"FY1" else ""
)
Incase if your financial year calculation invlolves any logic then please share it here to help you better.
For example if your financial year depends on current year then
let
Source = Excel.CurrentWorkbook(){[Name="YourTableName"]}[Content],
FiscalStartFY1 = #date(2023, 9, 25),
AddFY = Table.AddColumn(Source, "FiscalYearLabel", each
let
CurrentDate = [YourDateColumn],
FiscalYearNumber = Number.IntegerDivide(Duration.Days(CurrentDate - FiscalStartFY1), 365) + 1
in
"FY" & Text.From(FiscalYearNumber)
)
in
AddFY
Need a Power BI Consultation? Hire me on Upwork
Connect on LinkedIn
|
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
80 | |
76 | |
60 | |
36 | |
33 |
User | Count |
---|---|
91 | |
60 | |
59 | |
49 | |
45 |