Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
Hi Support team,
I need support in adding a dedicated column in my calendar table (Fiscal year calendar - May to April).
Calendar table have previous as well as future dates, I need to add a dedicated column which says "CY" for all dates for current FY (Current FY starts fom 1st May 2024 to 30th April 2025).
Can you experts help me to add a dedicated FISCAL CALENDAR and a dedicated column in it for Current Fiscal Year, and other values to be called as "Others"
thanks in advance.
Solved! Go to Solution.
Hi @rahulmenon
I recommend that you create a table for the current fiscal year.
current fiscal year = CALENDAR("5/1/2024", "4/30/2025")
Populate the new column by getting the largest and smallest dates for the current fiscal year.
Current Fiscal Year =
VAR CurrentFYStart = MIN('current fiscal year'[Date])
VAR CurrentFYEnd = MAX('current fiscal year'[Date])
RETURN
IF(
AND(
'FISCAL CALENDAR'[Date] >= CurrentFYStart,
'FISCAL CALENDAR'[Date] <= CurrentFYEnd
),
"CY",
"Others"
)
If your current fiscal year has changed, the new column should also change.
Regards,
Nono Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @rahulmenon
For your question, here is the method I provided:
Here's some dummy data
"FISCAL CALENDAR"
Create a column.
Current Fiscal Year =
VAR CurrentFYStart = DATE(2024, 5, 1)
VAR CurrentFYEnd = DATE(2025, 4, 30)
RETURN
IF(
AND(
'FISCAL CALENDAR'[Date] >= CurrentFYStart,
'FISCAL CALENDAR'[Date] <= CurrentFYEnd
),
"CY",
"Others"
)
Here is the result.
Regards,
Nono Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, thanks for your support. But in this case when the Fiscal Year changes, this measure will not work i guess. Correct me if I am wrong. I want a permanent column which is dynamic, should automatically able to change "CY" when the actual Fiscal Year changes.
Hi @rahulmenon
I recommend that you create a table for the current fiscal year.
current fiscal year = CALENDAR("5/1/2024", "4/30/2025")
Populate the new column by getting the largest and smallest dates for the current fiscal year.
Current Fiscal Year =
VAR CurrentFYStart = MIN('current fiscal year'[Date])
VAR CurrentFYEnd = MAX('current fiscal year'[Date])
RETURN
IF(
AND(
'FISCAL CALENDAR'[Date] >= CurrentFYStart,
'FISCAL CALENDAR'[Date] <= CurrentFYEnd
),
"CY",
"Others"
)
If your current fiscal year has changed, the new column should also change.
Regards,
Nono Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
90 | |
88 | |
83 | |
64 | |
49 |
User | Count |
---|---|
126 | |
110 | |
87 | |
70 | |
66 |