March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
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?
Solved! Go to Solution.
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]
)
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...
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😊
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
114 | |
76 | |
57 | |
52 | |
44 |
User | Count |
---|---|
168 | |
116 | |
63 | |
57 | |
50 |