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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
CastroRibeiro
Helper I
Helper I

Creates a column representing my fiscal month

I'm trying to create a column that represents my fiscal month, which goes from the 26th of the current month to the 25th of the next month

Example:

April runs from March 26th to April 25th

 

With my code, the date being filtered is from the 1st to the 26th of March, for example

 

My code:

 

if [Day] >26 then Date.AddDays([Date],10) 
else 
[Date]

 

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@CastroRibeiro , I have explained it here

DAX Calendar - Standard Calendar, Non-Standard Calendar, 4-4-4 Calendar
https://www.youtube.com/watch?v=IsfCMzjKTQ0&t=145s

 

Date = Var _1 = Addcolumns( CALENDAR(date(2020,01,01) , date(2022,12,31))
,"Start Month", if(day([Date]) <=25, EOMONTH([Date],-2)+26, EOMONTH([Date],-1)+26)
,"End Month", if(day([Date]) <=25, EOMONTH([Date],-1)+25, EOMONTH([Date],0)+25)
)
return _1

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@CastroRibeiro , I have explained it here

DAX Calendar - Standard Calendar, Non-Standard Calendar, 4-4-4 Calendar
https://www.youtube.com/watch?v=IsfCMzjKTQ0&t=145s

 

Date = Var _1 = Addcolumns( CALENDAR(date(2020,01,01) , date(2022,12,31))
,"Start Month", if(day([Date]) <=25, EOMONTH([Date],-2)+26, EOMONTH([Date],-1)+26)
,"End Month", if(day([Date]) <=25, EOMONTH([Date],-1)+25, EOMONTH([Date],0)+25)
)
return _1

Helpful resources

Announcements
July 2024 Power BI Update

Power BI Monthly Update - July 2024

Check out the July 2024 Power BI update to learn about new features.

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.

Top Solution Authors