Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
sportive92003
Frequent Visitor

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

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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