The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi need help to create a table with a loop process where it shows the following
i have start date and end date
and a list of people
need the table with the next structure
first
print the start date and the first person in the other table
then
print the start date + one day and the same first person
once it reaches the end date then switch over to the next person and repeat the process for each of the people that we have on the second table once it reaches the limit of people then end it, it is going to show a table like this
date person
01/01/2022 john
01/02/2022 john
01/03/2022 john
01/04/2022 john
...
...
...
01/01/2022 max
01/02/2022 max
01/03/2022 max
01/04/2022 max
...
...
...
end_date last_person
Solved! Go to Solution.
You could do this with CROSSJOIN. If you have your list of people and then a list of dates (probably from a date table) then you could try
CROSSJOIN ( DATESBETWEEN ( Date_Table[Date], [Start Date], [End Date] ), People[Name] )
You could do this with CROSSJOIN. If you have your list of people and then a list of dates (probably from a date table) then you could try
CROSSJOIN ( DATESBETWEEN ( Date_Table[Date], [Start Date], [End Date] ), People[Name] )
awesome, thank you