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
vjnvinod
Impactful Individual
Impactful Individual

Week Number calculated coloumn

Hi,

i am using the below calculated coloumn to arrive at week number, but the output what its is giving me is based on Calendar year

 

Week Number = WEEKNUM('Date'[Date])

 

I need output based on Fiscal year(1st July 2019- 30 June 2020)

what will be my forumula to arrive that?

also i would need a Week coloumn based on my month

for example July, 1st week Monday to Friday, show me that as Wk1 and so on till Wk4 or Wk5 and again for july same as Wk1 to Wk5 etc and so on

 

1 ACCEPTED SOLUTION

6 REPLIES 6
v-eachen-msft
Community Support
Community Support

Hi @vjnvinod ,

 

If you want to create a custom fiscal year calendar, you could refer to this similar case:

https://community.powerbi.com/t5/Desktop/Custom-Fiscal-Year-Calendar/m-p/85228

 

Community Support Team _ Eads
If this post helps, then please consider Accept it as the solution to help the other members find it.
amitchandak
Super User
Super User

Create a column start of year

 

start of year = startofyear([Date],"06/30")

Weekno = quotient(datediff([start of year],[Date],day),7) +1

OR

Weekno = quotient(datediff([start of year],[Date],day)+1,7) +1

 

You can move year start to week start like

Week Start date = 'Table'[start of year]-1*WEEKDAY('Table'[start of year],2)+1

 

https://docs.microsoft.com/en-us/dax/quotient-function-dax

 

 

 

@vjnvinod ,

Please find the attached file

@amitchandak 

 

Great stuff, it worked out:)

@vjnvinod , Thanks.

This one is a good example of 5-4-4 period.

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.