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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
Benedict21
Frequent Visitor

DAX next month

Hi, 

 

I am trying to create a column in my Date table that indicates the next month of the current date. My column reads:

 

IsNextMonth2 = 
Month(Dates[Date]) = MONTH(NOW() + 1)

 

It is reading True for December 2022 and False for all other months. But I want it to read True for January 2023 and False for all over months. Any suggestions? Thank you!

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Benedict21 

Try the code:

Is Next_month = var to_date = EOMONTH(TODAY(),1)
return YEAR('Month'[Date])=YEAR(to_date)&&MONTH('Month'[Date])=MONTH(to_date)
vxinruzhumsft_0-1670315673480.png

 

Best Regards!

Yolo Zhu

View solution in original post

7 REPLIES 7
Anonymous
Not applicable

Hi @Benedict21 ,

 

You can try the following code I modified:

IsNextMonth2 =

Month(Dates[Date]) = MONTH(MONTH(NOW())+1)

vxinruzhumsft_0-1669961965880.png

 

 

 Best Regards,

Yolo Zhu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi!

 

Thank you but this is only capturing the next month value, not the month and year value.

Anonymous
Not applicable

Hi @Benedict21 

You can try the following code:

 

var to_date=EOMONTH(TODAY()),1)

return MONTH('Month'[Date])=MONTH(to_date)
 

Best Regards,

Yolo Zhu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi, 

Thank you so much for your response. Again, only showing next month; not month and year. Any suggestions?

 

Capture2.PNG

Anonymous
Not applicable

Hi @Benedict21 

Try the code:

Is Next_month = var to_date = EOMONTH(TODAY(),1)
return YEAR('Month'[Date])=YEAR(to_date)&&MONTH('Month'[Date])=MONTH(to_date)
vxinruzhumsft_0-1670315673480.png

 

Best Regards!

Yolo Zhu

amitchandak
Super User
Super User

@Benedict21 , Try like

 

eomonth(Date[Date],0) = eomonth(Today(),1)

 

 

Month Type = Switch( True(),
eomonth(Date[Date],0) = eomonth(Today(),0) ,"Current Month" , //This Month
eomonth(Date[Date],0) = eomonth(Today(),-1) && ,"Previous Month" , //last Month
eomonth(Date[Date],0) = eomonth(Today(),1) && ,"Next Month" , //last Month
[Month Year]
)

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Hi! Thank you but I am getting a lot of incorrect syntax: Cannot find name 'Date'.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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