Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowGet inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.
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 FABINSIDER for a $400 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
31 | |
31 | |
20 | |
15 | |
12 |
User | Count |
---|---|
21 | |
20 | |
16 | |
10 | |
9 |