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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
brinky
Helper IV
Helper IV

Custom month

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.

1 ACCEPTED SOLUTION
Jihwan_Kim
Super User
Super User

Hi, @brinky 

Please check the below picture and the formula to create a new column.

 

Picture3.png

 

Custom Month CC =
MONTH('Table'[Date] +1)

 

 

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


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

View solution in original post

3 REPLIES 3
v-robertq-msft
Community Support
Community Support

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:

v-robertq-msft_0-1621497371345.png

 

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.

Jihwan_Kim
Super User
Super User

Hi, @brinky 

Please check the below picture and the formula to create a new column.

 

Picture3.png

 

Custom Month CC =
MONTH('Table'[Date] +1)

 

 

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


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.
ChrisMendoza
Resident Rockstar
Resident Rockstar

@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/....






Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

Proud to be a Super User!



Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.