Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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!
Solved! Go to Solution.
Hi @Benedict21
Try the code:
Best Regards!
Yolo Zhu
Hi @Benedict21 ,
You can try the following code I modified:
IsNextMonth2 =
Month(Dates[Date]) = MONTH(MONTH(NOW())+1)
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.
Hi @Benedict21
You can try the following code:
var to_date=EOMONTH(TODAY()),1)
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?
Hi @Benedict21
Try the code:
Best Regards!
Yolo Zhu
@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]
)
Hi! Thank you but I am getting a lot of incorrect syntax: Cannot find name 'Date'.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
43 | |
23 | |
21 | |
15 | |
15 |
User | Count |
---|---|
45 | |
31 | |
30 | |
18 | |
17 |