Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Good morning, I need to add the missing dates to the attendance list for each employee.
I have below information in my table
Employee ID
Month-Year,
Date,
Time in and Time Out
Thank you all very much!
Solved! Go to Solution.
Hi @Ahmedx , thanks for the quick solution.
I need all the missing days for the month.
Also, I added one more user to the solution, giving some errors..
post an example and show what result you are expecting
Hi @Ahmedx ,
Input Data
Employee ID | Date | Time In | Time Out |
100 | 27-12-2023 | 10 AM | 5 PM |
100 | 31-12-2023 | 9 AM | 7 PM |
200 | 27-12-202 | 9 AM | 3 PM |
200 | 31-12-2023 | 9 AM | 9 PM |
Output
Employee ID | Date | Time In | Time Out |
100 | 01-12-2023 | ||
200 | 01-12-2023 | ||
100 | 02-12-2023 | ||
200 | 02-12-2023 | ||
100 | 03-12-2023 | ||
200 | 03-12-2023 | ||
100 | 04-12-2023 | ||
200 | 04-12-2023 | ||
.. | |||
.. | |||
100 | 22-12-2023 | ||
200 | 22-12-2023 | ||
100 | 23-12-2023 | ||
200 | 23-12-2023 | ||
100 | 24-12-2023 | ||
200 | 24-12-2023 | ||
100 | 25-12-2023 | ||
200 | 25-12-2023 | ||
100 | 26-12-2023 | ||
200 | 26-12-2023 | ||
100 | 27-12-2023 | 10 AM | 5 PM |
200 | 27-12-2023 | 9 AM | 3 PM |
100 | 28-12-2023 | ||
200 | 28-12-2023 | ||
100 | 29-12-2023 | ||
200 | 29-12-2023 | ||
100 | 30-12-2023 | ||
200 | 30-12-2023 | 9 AM | 7 PM |
100 | 31-12-2023 | 9 AM | 7 PM |
200 | 31-12-2023 | 9 AM | 9 PM |
Hi @Ahmedx,
There is one issue in the solution: missing dates are showing based on the max date; if there is no record for one employee for the last week, then those days are not showing. Can you please suggest a solution for this?
Thank you so much for the effort and support @Ahmedx.
One thing: I removed last year's data and some unwanted fields before grouping, but after expanding the data, last year's data and removed fields are also showing.
Can you please guide me to learn advanced power-query skills?
If you removed last year's data and some unnecessary fields before grouping, then after expanding the data these fields should not appear.
give an example or your file I will help
Yes, correct @Ahmedx. I forgot to update the previous step name for the grouping step.
Can you please suggest some resources for learning advanced power query.
Hello @SonaSinghA
create a dimdate ( you can from here ) https://radacad.com/all-in-one-script-to-create-date-dimension-in-power-bi-using-power-query
then in power query, select the attendance table , and merge it with the dimdate .
choose the join type to be left join to dimdate . ( this way you get everything in dimdate that does not exist in your table ) .
1 --> your table
2--> dimdate table
3--> right join
let me know if it works for you .
NB ( you need to join with dimdate table having only dates for today's date so that you only return the dates missing until todays an not until end of year 2024 ) so maybe the dimdate created needs some minor tweaking .
If this answers your question , mark it as the solution ✅ so can you can help other people in the community find it easily .
Can you please share your demo input and expected output!
Input Data
Employee ID | Date | Time In | Time Out |
100 | 27-12-2023 | 10 AM | 5 PM |
100 | 31-12-2023 | 9 AM | 7 PM |
200 | 27-12-202 | 9 AM | 3 PM |
200 | 31-12-2023 | 9 AM | 9 PM |
Output
Employee ID | Date | Time In | Time Out |
100 | 01-12-2023 | ||
200 | 01-12-2023 | ||
100 | 02-12-2023 | ||
200 | 02-12-2023 | ||
100 | 03-12-2023 | ||
200 | 03-12-2023 | ||
100 | 04-12-2023 | ||
200 | 04-12-2023 | ||
.. | |||
.. | |||
100 | 22-12-2023 | ||
200 | 22-12-2023 | ||
100 | 23-12-2023 | ||
200 | 23-12-2023 | ||
100 | 24-12-2023 | ||
200 | 24-12-2023 | ||
100 | 25-12-2023 | ||
200 | 25-12-2023 | ||
100 | 26-12-2023 | ||
200 | 26-12-2023 | ||
100 | 27-12-2023 | 10 AM | 5 PM |
200 | 27-12-2023 | 9 AM | 3 PM |
100 | 28-12-2023 | ||
200 | 28-12-2023 | ||
100 | 29-12-2023 | ||
200 | 29-12-2023 | ||
100 | 30-12-2023 | ||
200 | 30-12-2023 | 9 AM | 7 PM |
100 | 31-12-2023 | 9 AM | 7 PM |
200 | 31-12-2023 | 9 AM | 9 PM |
Hi @Ahmedx ,
Input Data
Employee ID | Date | Time In | Time Out |
100 | 27-12-2023 | 10 AM | 5 PM |
100 | 31-12-2023 | 9 AM | 7 PM |
200 | 27-12-202 | 9 AM | 3 PM |
200 | 31-12-2023 | 9 AM | 9 PM |
Output
Employee ID | Date | Time In | Time Out |
100 | 01-12-2023 | ||
200 | 01-12-2023 | ||
100 | 02-12-2023 | ||
200 | 02-12-2023 | ||
100 | 03-12-2023 | ||
200 | 03-12-2023 | ||
100 | 04-12-2023 | ||
200 | 04-12-2023 | ||
.. | |||
.. | |||
100 | 22-12-2023 | ||
200 | 22-12-2023 | ||
100 | 23-12-2023 | ||
200 | 23-12-2023 | ||
100 | 24-12-2023 | ||
200 | 24-12-2023 | ||
100 | 25-12-2023 | ||
200 | 25-12-2023 | ||
100 | 26-12-2023 | ||
200 | 26-12-2023 | ||
100 | 27-12-2023 | 10 AM | 5 PM |
200 | 27-12-2023 | 9 AM | 3 PM |
100 | 28-12-2023 | ||
200 | 28-12-2023 | ||
100 | 29-12-2023 | ||
200 | 29-12-2023 | ||
100 | 30-12-2023 | ||
200 | 30-12-2023 | 9 AM | 7 PM |
100 | 31-12-2023 | 9 AM | 7 PM |
200 | 31-12-2023 | 9 AM | 9 PM |
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
72 | |
71 | |
55 | |
37 | |
31 |
User | Count |
---|---|
90 | |
62 | |
61 | |
49 | |
45 |