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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
Anonymous
Not applicable

How to calculate month from custom date range

Hi All,

 

First off I would like to thank everyone who participates on this forum, it has really great stuff.

 

I'm trying to create the following report in Power BI Desktop:

 

here I need to calculate month from the custom date ranges.

 

startdateend dateexpected output
02-08-202005-09-2020August
05-07-202001-08-2020July
07-06-202004-07-2020June

 

This is the date range but I need to create month column where the first row would be August, Next row would be July and so on..Basically my requirement is August should be considered from 02-08-2020 to 05-09-2020. My months startdate and enddate should be as per mentioned on the above table.

 

Please let me know if anyone can crack this problem.

 

Thanks in advance.

4 REPLIES 4
ryan_mayu
Super User
Super User

@Anonymous 

is this what you want?

Column = 
FORMAT('Table (2)'[STARTDATE],"mmmm")

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




amitchandak
Super User
Super User

@Anonymous , Not very clear. Can you share the expected output?

 

Refer this if you want all dates between dates

https://www.dropbox.com/s/bqbei7b8qbq5xez/leavebetweendates.pbix?dl=0

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
Anonymous
Not applicable

Hi,

 

I have mentioned the expected output as well. It's just that I need to create the month column based on mentioned startdate and enddate.

 

Please let me know if you have any solution for this.

hi  @Anonymous 

startdate end date expected output
02-08-2020 05-09-2020 August
05-07-2020 01-08-2020 July
07-06-2020 04-07-2020 June

 

It likes a fiscal date table, and but what is the logic of your expected output.

for example:

start 02/08/2020 and end 05-09-2020, why the expected output is August not September?

 

and if start 28/08/2020 and end 28-09-2020, what is the expected output? August or September?

and if start 28/08/2020 and end 28-10-2020, what is the expected output? August or September or October?

 

Regards,

Lin

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

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

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.

Top Solution Authors