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

Custom Date Table - Same Month Returning as 2 Month Numbers

Hello everyone!

 

I created a custom Date Table for our Fiscal Year where February = Month 1 and built my custom columns from this. It seemed to be working fine, however, I tried to recreate custom column, but it defaults 2/1/2020 to Month 1 and 2/2/2020 to Month 2.  I tried to recreate the issue on the table where the month numbers are correctly pulling and the same thing happens. Help!

 

Base Table: 

rtqjordan_0-1619961950903.png

Month Number:

rtqjordan_1-1619962008555.png

 

Correct Columns:

rtqjordan_2-1619962129651.png

 

2/1/2020 recognized as Month 1 and 2/2/2020 as Month 2

rtqjordan_3-1619962162189.png

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

@Anonymous 

Same issue happened to me with month(), you may used the following column instead.

 

Column = IF(([Date].[MonthNo])=1,12,([Date].[MonthNo])-1)
 
V-pazhen-msft_0-1620179037549.png


Paul Zheng _ Community Support Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.

View solution in original post

8 REPLIES 8
Anonymous
Not applicable

@Anonymous 

Same issue happened to me with month(), you may used the following column instead.

 

Column = IF(([Date].[MonthNo])=1,12,([Date].[MonthNo])-1)
 
V-pazhen-msft_0-1620179037549.png


Paul Zheng _ Community Support Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.

Fowmy
Super User
Super User

@Anonymous 

Create your month number column using the following code and try:

 Month Number =  MONTH(EOMONTH([Date],-1))



 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Anonymous
Not applicable

Thank you!

Anonymous
Not applicable

You could do a switch or nested if statement 

 

so if month from date is February then 2 if month from date is March then 3 etc. 

 

last thing is make a calendar in excel based on what you want and then query it in. 

Anonymous
Not applicable

Thanks! My issue is it worked in the past, so not sure why it stopped working.

Anonymous
Not applicable

Oh ok I wonder If the format of the date column changed. Have you tried adjusting it in column settings? that might of caused the issue if it worked previously. 

Anonymous
Not applicable

Nothing has changed... in fact when I tried to recreate the month number column on the same table with the correct month numbers, I get the same issue. Thanks for replying!

Anonymous
Not applicable

Hey @Anonymous 

this one is weird i opened up my laptop duplicated your query and then couldn't get the same issue.  i get the corrected result.   not sure what is happening in you report.  any chance you could send a copy to see what is happening? 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.