Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!
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
Vote for your favorite vizzies from the Power BI World Championship submissions!
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 64 | |
| 50 | |
| 42 | |
| 23 | |
| 20 |
| User | Count |
|---|---|
| 139 | |
| 116 | |
| 53 | |
| 37 | |
| 31 |