The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi all.
I am after some advice on how to create 2 x December months for one reporting period as registrations for my program commence mid December in one year and finish mid December the next i.e 15 December 2024 - 14 December 2025.
Especially when displaying, how to get the following.
Dec 2024
Jan 2025
Feb 2025
Mar 2025
Apr 2025
May 2025
Jun 2025
Jul 2025
Aug 2025
Sep 2025
Oct 2025
Nov 2025
Dec 2025
Even if Dec 2024 is Dec 1 and Dec 2025 is Dec 2 to assist as all Dec data is currently going in together at the moment.
Solved! Go to Solution.
Hi could you try this
CustomMonthYear =
VAR CurrentYear = YEAR('Date'[Date])
VAR DecStart = DATE(CurrentYear, 12, 15)
RETURN
IF(
MONTH('Date'[Date]) = 12 && 'Date'[Date] >= DecStart,
"Dec " & CurrentYear + 1,
IF(
MONTH('Date'[Date]) = 12 && 'Date'[Date] < DecStart,
"Dec " & CurrentYear,
FORMAT('Date'[Date], "MMM YYYY")
)
)
If any of my post helped please give a kudos and accept the solution also
Thanks in advance
Hi @TonyAshton seeems you need fiscal calendar which start / end in December?
If yes, in your Calendar / Date table create fiscal related columns. Check link for example and adjust to your calendar, like VAR FirstFiscalMonth = 3 in your case should be VAR FirstFiscalMonth = 12
Proud to be a Super User!
Hi create a custom column and try this
CustomMonthYear =
VAR DecStart = DATE(YEAR('Date'[Date]), 12, 15)
RETURN
IF(
MONTH('Date'[Date]) = 12 && 'Date'[Date] >= DecStart,
"Dec " & YEAR('Date'[Date]),
IF(
MONTH('Date'[Date]) = 12 && 'Date'[Date] < DecStart,
"Dec " & (YEAR('Date'[Date]) - 1),
FORMAT('Date'[Date], "MMM YYYY")
)
)
Thanks Akash. It kind of work but displays 1 Dec - 14 Dec as the previous year.
Hi could you try this
CustomMonthYear =
VAR CurrentYear = YEAR('Date'[Date])
VAR DecStart = DATE(CurrentYear, 12, 15)
RETURN
IF(
MONTH('Date'[Date]) = 12 && 'Date'[Date] >= DecStart,
"Dec " & CurrentYear + 1,
IF(
MONTH('Date'[Date]) = 12 && 'Date'[Date] < DecStart,
"Dec " & CurrentYear,
FORMAT('Date'[Date], "MMM YYYY")
)
)
If any of my post helped please give a kudos and accept the solution also
Thanks in advance
User | Count |
---|---|
11 | |
9 | |
6 | |
6 | |
5 |
User | Count |
---|---|
23 | |
14 | |
14 | |
9 | |
7 |