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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
MQUINT-07
Regular Visitor

Custom Calendar fiscal year october

i want to create a day number on DAX Calendar.

 

we have a custom calendar for fiscal year, our fiscal year stars on october 1 and i want to create a column when day #1 are october first, 2 october second...

 

could you please help?, i alredy try trhu date dif:

 

daynum#FIX = DATEDIFF ( DATE ( YEAR ('Calendario End Date'[Date]),10,1 ), 'Calendario End Date'[Date], DAY ) + 1
 

but when function comes to 1jan retun -273 

 

MQUINT07_0-1657127010902.png

MQUINT07_1-1657127049879.png

 

thanks in advance for the help

 

1 ACCEPTED SOLUTION

Hello Thanks for your help.

 

its help me to find the way, the solve it´s the following:

 

daynum#FIX2 = IF('Calendario End Date'[Date] >= DATE(YEAR('Calendario End Date'[Date]),10,1),DATEDIFF(DATE(YEAR('Calendario End Date'[Date]),10,1),'Calendario End Date'[Date],DAY)+1,DATEDIFF (DATE(YEAR('Calendario End Date'[Date]),1,1), DATEADD('Calendario End Date'[Date],92,DAY), DAY ) + 1)
 
i was to use an if function to declare when it will the first day of the year (1 oct) and use 2 function 1 for dates after 1 oct and dates before.

i really apreciate your time.
 
best regards.
 
 

View solution in original post

5 REPLIES 5
technolog
Super User
Super User

You need to change number of YEAR 

technolog_0-1657127404527.png

 

In your case you get current YEAR number but you need to use DATEADD and move start of the year.

You need to try something like this:

daynum#FIX = DATEDIFF ( DATE ( DATEADD( YEAR ('Calendario End Date'[Date]),10,1 ) , XXX, DAY), 'Calendario End Date'[Date], DAY ) + 1
 
where XXX - the number of days that you change you from calendar year.

i trayed but its still remarkme error, 

 

daynum#FIX2 = DATEDIFF (DATEADD('Calendario End Date',273,DAY), 'Calendario End Date'[Date], DAY ) + 1
 
MQUINT07_0-1657130576651.png

thanks for your support.

 

best regards.

try add

daynum#FIX2 = DATEDIFF (DATEADD('Calendario End Date'[Date],273,DAY), 'Calendario End Date'[Date], DAY ) + 1

Hello Thanks for your help.

 

its help me to find the way, the solve it´s the following:

 

daynum#FIX2 = IF('Calendario End Date'[Date] >= DATE(YEAR('Calendario End Date'[Date]),10,1),DATEDIFF(DATE(YEAR('Calendario End Date'[Date]),10,1),'Calendario End Date'[Date],DAY)+1,DATEDIFF (DATE(YEAR('Calendario End Date'[Date]),1,1), DATEADD('Calendario End Date'[Date],92,DAY), DAY ) + 1)
 
i was to use an if function to declare when it will the first day of the year (1 oct) and use 2 function 1 for dates after 1 oct and dates before.

i really apreciate your time.
 
best regards.
 
 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.