Week number for Qtr

Hi @KimC,

I’ve replaced your Date table M code with the Extended date table, you can find here.

Next I added a new dimension called CalcForWkInQ which is an interger:
[Fiscal Year]*10000 + [Fiscal Quarter]*1000 + [WeekOffset]

Amended the logic for the Calculated Column slightly.

Week in Quarter = 
VAR Q = Dates[Fiscal Quarter]
VAR Y = Dates[Fiscal Year]
RETURN

RANKX(
    FILTER(
        Dates,
        Dates[Fiscal Quarter] = Q &&
        Dates[Fiscal Year] = Y
    ),
    Dates[CalcForWkInQ]
    ,
    , ASC
    , Dense
)

Here’s your updated sample file. WeekOfQtr v2.pbix (101.7 KB)
I hope this is helpful.

1 Like