Calendrier 2 = 
VAR PremierMoisFiscal = 9         -- premier mois de l'année fiscale
VAR PremierJourDeLaSemaine = 1    -- 0 = dimanche, 1 = lundi , ...
VAR PremiereAnnee = 2025          -- détermine la première année à uitliser
    
RETURN

GENERATE (
    CALENDAR(
        DATE(PremiereAnnee, 1, 1),
        DATE(YEAR(TODAY()),12,31)
    ),
    VAR Yr = YEAR ( [Date] )             -- Year Number
    VAR Mn = MONTH ( [Date] )            -- Month Number (1-12)
    VAR Qr = QUARTER ( [Date] )          -- Quarter Number (1-4)
    VAR MnQ = Mn - 3 * (Qr - 1)          -- Month in Quarter (1-3)
    VAR Wd = WEEKDAY ( [Date], 1 ) - 1   -- Weekday Number (0 = Sunday, 1 = Monday, ...)
    VAR Fyr =                            -- Fiscal Year Number
        Yr + 1 * ( PremierMoisFiscal > 1 && Mn >= PremierMoisFiscal )
    VAR Fqr =                            -- Fiscal Quarter (string)
        FORMAT ( EOMONTH ( [Date], 1 - PremierMoisFiscal ), "\QQ" )
    RETURN 

ROW (
        "Annee", Yr,
        "Annee Trimestre", FORMAT ( [Date], "\QQ-YYYY" ),
        "Date Fin de Trimestre", EOMONTH ( [Date], 3 - MnQ ),
        "Trimestre", FORMAT ( [Date], "\QQ" ),
        "Annee Mois", FORMAT([Date], "YYYY-MM"),
        "Mois", FORMAT([Date], "MM"),
        "Annee Fiscale", Fyr,
        "Annee Trimestre Fiscal", "F" & Fqr & "-" & Fyr,
        "Date Fin de Trimestre Fiscal", EOMONTH ( [Date], 3 - MnQ ),
        "Trimestre Fiscal", "F" & Fqr
    )
)