Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
In Power Query,
I am trying to use Power Query to general a Fiscal Year.
Eg. If April 1, 2022, then Fiscal Year is FY22/23
Here is my Custom Column Formula:
if [Month] ❤️ then "FY" &
Text.End(Number.ToText([Year]),2) & "/" &
Text.End(Number.ToText([Year],2) else
"FY" &
Text.End(Number.ToText([Year]),2) & "/" &
Text.End(Number.ToText([Year}+1,2)
Result: Token Comma expected. When I click Show Error, it highlights "else."
How do I fix this?
Thanks.
Solved! Go to Solution.
Hi @BAFreedom ,
I think you have few typos there. There is bracket missing + one bracket ) is }.
Check my code:
if [Month] ❤️ then "FY" &
Text.End(Number.ToText([Year]),2) & "/" &
Text.End(Number.ToText([Year],2)) else
"FY" &
Text.End(Number.ToText([Year]),2) & "/" &
Text.End(Number.ToText([Year]+1,2))
Hi @BAFreedom ,
I think you have few typos there. There is bracket missing + one bracket ) is }.
Check my code:
if [Month] ❤️ then "FY" &
Text.End(Number.ToText([Year]),2) & "/" &
Text.End(Number.ToText([Year],2)) else
"FY" &
Text.End(Number.ToText([Year]),2) & "/" &
Text.End(Number.ToText([Year]+1,2))
Thank you
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 84 | |
| 49 | |
| 38 | |
| 31 | |
| 30 |