Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreJoin the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now
Hi Expert
I need to create a new column using IF statement to calculate my finance year.
E.g: if date falls between April 2019 to March 2020 = FY 20
if date falls between April 2018 to March 2019 = FY 19
Can anyone help me with this statement?
Solved! Go to Solution.
Hi, @Yuiitsu
Based on your description, I created data to reproduce your scenario.
Table:
Table = CALENDAR(DATE(2018,1,1),DATE(2020,12,31))
You may create a calculated column as below.
finance year =
var _date = 'Table'[Date]
var _month = MONTH(_date)
var _year = YEAR(_date)
return
IF(
_month>=4&&_month<=12,
CONCATENATE("FY",VALUE(FORMAT(_date,"YY"))+1),
IF(
_month<=3&&_month>=1,
CONCATENATE("FY",VALUE(FORMAT(_date,"YY"))+0)
)
)
Result:
Best Regards
Allan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @Yuiitsu
Based on your description, I created data to reproduce your scenario.
Table:
Table = CALENDAR(DATE(2018,1,1),DATE(2020,12,31))
You may create a calculated column as below.
finance year =
var _date = 'Table'[Date]
var _month = MONTH(_date)
var _year = YEAR(_date)
return
IF(
_month>=4&&_month<=12,
CONCATENATE("FY",VALUE(FORMAT(_date,"YY"))+1),
IF(
_month<=3&&_month>=1,
CONCATENATE("FY",VALUE(FORMAT(_date,"YY"))+0)
)
)
Result:
Best Regards
Allan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Create an end of year and use
FY = "FY" & format(endofyear([date],"3/31"),"YY")
https://docs.microsoft.com/en-us/dax/endofyear-function-dax
You also have startofyear. That also takes the end date as parameter, if needed
Check out the April 2026 Power BI update to learn about new features.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
| User | Count |
|---|---|
| 48 | |
| 40 | |
| 38 | |
| 20 | |
| 16 |
| User | Count |
|---|---|
| 68 | |
| 67 | |
| 30 | |
| 26 | |
| 26 |