Reply
sportive92003
Helper II
Helper II

Format Month

Hello,

Simple thing, but I don't know how to reach it. Just want to have "September" for Month 1 as it's my first Fiscal Month, "October" for Fiscal Month 2, etc... instead of 1,2,3,4,...

 

Where to put in in this programmation?

 

Dates =
VAR FirstCY = YEAR( FIRSTDATE('Feuil1 (2)'[date_de_la_facture]))
VAR FirstCM = MONTH(FIRSTDATE('Feuil1 (2)'[date_de_la_facture]))
VAR FirstFY = IF(FirstCM <=8, FirstCY - 1, FirstCY)
VAR LastCY = YEAR( LASTDATE('Feuil1 (2)'[date_de_la_facture]))
VAR LastCM = MONTH(LASTDATE('Feuil1 (2)'[date_de_la_facture]))
VAR LastFY = IF(LastCM <=8, LastCY, LastCY + 1)
VAR DatesTable =
CALENDAR("01/09/"&FirstFY, "31/08/"&LastFY)
RETURN
ADDCOLUMNS(DatesTable,
"Year", YEAR([Date]),
"FiscalYear", "FY" &IF(MONTH([Date]) >=9, YEAR([Date]) + 1, YEAR([Date])),
"CalendarMonth", MONTH([Date]),
"FiscalMonth", IF(MONTH([Date]) >= 9, MONTH([Date]) - 8, MONTH([Date]) + 4),
"CalendarQuarter", QUARTER([Date]),

"FiscalQuarter", "Q"& IF(MONTH([Date]) >= 7, QUARTER([Date]) - 2, QUARTER([Date]) + 1),

"FY&YQuarter", "FY" & IF(MONTH([Date]) >= 9, YEAR([Date]) + 1, YEAR([Date])) &  " - Q" & IF(MONTH([Date]) >= 9, QUARTER([Date]) - 2, QUARTER([Date]) + 2),
"Month&Year", FORMAT([Date], "mmm yyyy"),
"MonthOrderID", IF(MONTH([Date]) >=9, YEAR([Date]) + 1, YEAR([Date])) * 100 + IF(MONTH([Date]) >= 9, MONTH([Date]) - 8, MONTH([Date]) + 4),
"WeekDay", IF(WEEKDAY([Date], 2) < 6, "WeekDay", "Weekend"),
"Day", FORMAT([Date], "dddd"))
0 REPLIES 0
avatar user

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

Feb2025 NL Carousel

Fabric Community Update - February 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors (Last Month)
Top Kudoed Authors (Last Month)