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
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
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.