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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
cdawidow2
Frequent Visitor

FISCAL QUARTER WEEK CALCULATIONS - CONFUSED

Hi guys,  I developed a calculated column to group dates within a Fiscal Quarter into their respective Week Groupings within the fiscal quarter.  

 

The measure works perfectly for FQ1,FQ2,FQ3 but not for FQ4 which I believe is because the calculation is confused by my fiscal periods ( Fiscal Year Begins in Feb) 

 

Here is my measure : 

VAR Q = 'DATE'[FiscalQuarter]
VAR Y = 'DATE'[FiscalYear]
VAR FYMONTH = 'DATE'[FiscalMonthNum]
VAR MONTH1 = FORMAT('DATE'[Date],"MMM")
VAR WEEKNUM1 =
RANKX(FILTER('DATE','DATE'[FiscalQuarter] = Q &&
'DATE'[FiscalYear] = Y
),
WEEKNUM('DATE'[Date],2),,ASC,Dense)
VAR WEEKNUMBERS = IF('DATE'[QUARTER START DAY] <> "Mon" && WEEKNUM1 = 1,1,IF('DATE'[QUARTER START DAY] <> "Mon",WEEKNUM1-1,WEEKNUM1))
RETURN WEEKNUM1
 
Here are my skewed reuslts for Q4 : As you can see FQ4 should begin in November but the weeks start ascending in January, then November and finally December but the tru order should be November, December and then January.  Any idea how to fix my formula to take into account my fiscal period?
 
 
W2.PNG

 

W1.PNG

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@cdawidow2 , This should be you FY Qtr Week

 

New column =
var _st = [QUARTER START DAY]
Var _mon = _st -weekday(_st,2)+1
return
Quotient(datediff(_mon,[Date],day),7)+1

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@cdawidow2 , This should be you FY Qtr Week

 

New column =
var _st = [QUARTER START DAY]
Var _mon = _st -weekday(_st,2)+1
return
Quotient(datediff(_mon,[Date],day),7)+1

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.