Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.
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]
)
Check out the November 2023 Power BI update to learn about new features.
Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.
Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!