Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hello,
Any idea how to get month starting on the last day of prevouis month till end of the following month less 1 day in a calendar table?
Example month 4 April starts on 31/03/2021 & ends 29/04/2021.
Thanks in advance.
Solved! Go to Solution.
Hi, @brinky
Please check the below picture and the formula to create a new column.
Hi, My name is Jihwan Kim.
If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.
Linkedin: linkedin.com/in/jihwankim1975/
Twitter: twitter.com/Jihwan_JHKIM
Hi, @brinky
According to your description, do you mean that you want to get a dynamic calendar table based on the month of the current date with your logic?
If so, I think you can try to use the EOMONTH() function in DAX to simply achieve this using a calculated table.
You can create a calculated table like this:
Calendar =
var _startdate=EOMONTH(TODAY(),-1)
var _enddate=EOMONTH(TODAY(),0)-1
return
CALENDAR(_startdate,_enddate)
And you can get what you want like this:
More info about the EOMONTH() function in DAX
You can download my test pbix file below
If this result is not what you want, you can explain your expected result in detail.
How to Get Your Question Answered Quickly
Thank you very much!
Best Regards,
Community Support Team _Robert Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @brinky
Please check the below picture and the formula to create a new column.
Hi, My name is Jihwan Kim.
If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.
Linkedin: linkedin.com/in/jihwankim1975/
Twitter: twitter.com/Jihwan_JHKIM
@brinky - You might want to take a look at my blog post → https://community.powerbi.com/t5/Community-Blog/Create-a-Custom-Period-Calendar-in-Power-Query/ba-p/....
Proud to be a Super User!
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 40 | |
| 37 | |
| 35 | |
| 34 | |
| 28 |
| User | Count |
|---|---|
| 136 | |
| 99 | |
| 73 | |
| 66 | |
| 65 |