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

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

Reply
RK9009
Frequent Visitor

month end dates between date range

Hi All, 

I am working with two date columns: 
Example,
StudentID                Start Date     End Date
1                                4/25/2021    7/15/2021    
2                                2/5/2021.    5/25/2021

I am trying generate a list of dates that include month end dates or end date. An example of the result that I am looking for,

StudentID                Start Date     End Date.             New Column 
1                                4/25/2021    7/15/2021           4/30/2021
1                                4/25/2021    7/15/2021           5/31/2021
1                                4/25/2021    7/15/2021           6/30/2021
1                                4/25/2021    7/15/2021           7/15/2021 - this is the end date 
2                                2/5/2021.    5/25/2021            2/28/2021 
2                                2/5/2021.    5/25/2021            3/31/2021 
2                                2/5/2021.    5/25/2021            4/30/2021 
2                                2/5/2021.    5/25/2021            5/25/2021


Any thoughts on how to do this. Thank you so much.

1 ACCEPTED SOLUTION
v-robertq-msft
Community Support
Community Support

Hi, 

Have you followed the DAX formula posted by PaulOlding to find the solution to your problem?

If so, would you like to mark his reply as a solution so that others can learn from it too?

 

Thanks in advance!

How to Get Your Question Answered Quickly 

 

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.

View solution in original post

2 REPLIES 2
v-robertq-msft
Community Support
Community Support

Hi, 

Have you followed the DAX formula posted by PaulOlding to find the solution to your problem?

If so, would you like to mark his reply as a solution so that others can learn from it too?

 

Thanks in advance!

How to Get Your Question Answered Quickly 

 

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.

PaulOlding
Solution Sage
Solution Sage

Hi @RK9009 

Here's some DAX to create a new table 

New Table = 
VAR _MonthEndBetween = 
FILTER(
	GENERATE(
		'Table',
		CALENDAR('Table'[Start Date], 'Table'[End Date])
		),
	[Date] = EOMONTH([Date], 0)
	)
VAR _EndDate = 
ADDCOLUMNS(
	'Table',
	"Date", 'Table'[End Date]
	)
RETURN
UNION(_MonthEndBetween, _EndDate)

 

PaulOlding_0-1644003607454.png

 

Helpful resources

Announcements
OCT PBI Update Carousel

Power BI Monthly Update - October 2024

Check out the October 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

October NL Carousel

Fabric Community Update - October 2024

Find out what's new and trending in the Fabric Community.

Top Kudoed Authors