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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
CAOLU10
Regular Visitor

Transform data from a summarized format into a more granular format

I would like to know if Power BI has such function that for example. I have a regular allowance payment to employee and the data report is only show one row with the payment period and i would to like convert to monthly payment items based on the start date and end date? can Power BI make it happen?

CAOLU10_0-1730791695010.png

 

1 ACCEPTED SOLUTION
johnt75
Super User
Super User

You could create a new table like

Detailed Table = SELECTCOLUMNS(
	GENERATE(
		'Table',
		VAR _Dates = FILTER( CALENDAR( 'Table'[Start Date], 'Table'[End Date] ), DAY( [Date] ) = 1 )
		VAR Result = SELECTCOLUMNS(
			_Dates,
			"Start Month", [Date],
			"End Month", EOMONTH( [Date] , 0 )
		)
		RETURN Result
	),
	[Name],
	[Allowance],
	[Start Month],
	[End Month]
)

View solution in original post

3 REPLIES 3
Ashish_Mathur
Super User
Super User

Hi,

To create one row for each month which falls between the start and end date, follow the steps shown in this Blog article - Generating Rows by Month for Date Ranges in Power Query | by Daniel Marsh-Patrick | Daniel Marsh-Pat...


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
johnt75
Super User
Super User

You could create a new table like

Detailed Table = SELECTCOLUMNS(
	GENERATE(
		'Table',
		VAR _Dates = FILTER( CALENDAR( 'Table'[Start Date], 'Table'[End Date] ), DAY( [Date] ) = 1 )
		VAR Result = SELECTCOLUMNS(
			_Dates,
			"Start Month", [Date],
			"End Month", EOMONTH( [Date] , 0 )
		)
		RETURN Result
	),
	[Name],
	[Allowance],
	[Start Month],
	[End Month]
)

Thank you soooooo much for the solution which solve my problem and give me more insights for the new function with VAR😊

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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