Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon'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.
Hi guys, i need some help
I have a table with Start Date and End Date for each employee
I need to create one row for each day between these two date, repeating the employee names.
Is there a way to do that?
Solved! Go to Solution.
I had a similar usecase within my work environment and I solved this using M powerquery.
They idea is to create a list with dates between the start data and the enddate
You can create a new column containing the list with dates as followed:
I had a similar usecase within my work environment and I solved this using M powerquery.
They idea is to create a list with dates between the start data and the enddate
You can create a new column containing the list with dates as followed:
Do you mean if the enddate is null? You could choose to replace those values with the date from DateTime.LocalNow from https://learn.microsoft.com/en-us/powerquery-m/datetime-localnow
If that isn't what your saying could you then provide a small example table with dummy data
Add 1 to the "Count" parameter:
List.Dates([Start], Duration.Days([End] - [Start])+1, #duration(1,0,0,0))
You could create a calculated table in DAX
Employee dates =
SELECTCOLUMNS (
GENERATE ( Employee, CALENDAR ( Employee[Start date], Employee[End date] ) ),
"Employee first name", Employee[First name],
"Employee last name", Employee[Last name],
"Date", [Date]
)
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
15 | |
14 | |
13 | |
10 | |
8 |