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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

Code to Find Fiscal Week of a Quarter (445 Calendaring)

Hello all,

 

I am currently trying to make graphs where I am able to drill down from Fiscal Year -> Fiscal Quarter -> Fiscal Month -> Fiscal Week; however, I am having issues figuring out code that can find the given week of a Quarter (1-13 using 445 calendaring) from a given date. The fiscal year I am working with is from May 1st - Apr 30th, so Q1 would be May, June and July so on and so forth. 

 

In the below image, I found the Fiscal Year, Quarter and Month with functions on Excel, but I couldn't figure out the code for week so hopefully someone can do it via DAX. An example of an expected result using the below table would be 1/2/2018 = Week 5 and 2/6/2018 = Week 10

 

Any help/guidance would be much appreciated. Please let me know if you need any clarification.

Thanks

Dates.PNG

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi  @Anonymous 

According to the calendar, January 2 is the first week. If you want him to show as the fifth week, you can add 4 after it. You can refer to my sample .

Measure = WEEKNUM(SELECTEDVALUE('Table'[Date]))+4

Ailsamsft_0-1658912061618.png

I have attached my pbix file .

 

Best Regards,
Community Support Team _ Ailsa Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@Anonymous , Wee if the week code I have given here can help

https://amitchandak.medium.com/cheat-sheet-power-bi-4-4-4-and-4-4-5-calendar-786f76da7d92

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
Anonymous
Not applicable

Unfortunately, the outputted week numbers from your function aren't consistent with my companies fiscal weeks, so I can't use the code.

Anonymous
Not applicable

Hi  @Anonymous 

According to the calendar, January 2 is the first week. If you want him to show as the fifth week, you can add 4 after it. You can refer to my sample .

Measure = WEEKNUM(SELECTEDVALUE('Table'[Date]))+4

Ailsamsft_0-1658912061618.png

I have attached my pbix file .

 

Best Regards,
Community Support Team _ Ailsa Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Helpful resources

Announcements
November Fabric Update Carousel

Fabric Monthly Update - November 2025

Check out the November 2025 Fabric update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Users online (25)