Forum Discussion
Benedict21
3 years agoFrequent 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 read...
- Anonymous3 years ago
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)Best Regards!
Yolo Zhu
amitchandak
Super User
3 years agoBenedict21 , 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]
)
Benedict21
3 years agoFrequent Visitor
Hi! Thank you but I am getting a lot of incorrect syntax: Cannot find name 'Date'.