Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I have a staff table that I need to add week end dates to per staff member. I have tried changing relationships to my existing date table and creating new columns, but for some reason, I am not getting the results I want. I feel like I'm missing something easy.
My sample data is below:
Staff Table:
ID | Name | Category | Available Hours |
1000 | Jane Doe | Staff 1 | 38.8 |
1001 | John Doe | Staff 2 | 40 |
1002 | Mike Smith | Intern | 40 |
1003 | John Roberts | Staff 3 | 38.8 |
1004 | Mark Johnson | Intern 2 | 27.5 |
Desired Result:
EMID | Name | Category | Available Hours | Week End |
1000 | Jane Doe | Staff 1 | 38.8 | 1/21/2022 |
1001 | John Doe | Staff 2 | 40 | 1/21/2022 |
1002 | Mike Smith | Intern | 40 | 1/21/2022 |
1003 | John Roberts | Staff 3 | 38.8 | 1/21/2022 |
1004 | Mark Johnson | Intern 2 | 27.5 | 1/21/2022 |
1000 | Jane Doe | Staff 1 | 38.8 | 1/28/2022 |
1001 | John Doe | Staff 2 | 40 | 1/28/2022 |
1002 | Mike Smith | Intern | 40 | 1/28/2022 |
1003 | John Roberts | Staff 3 | 38.8 | 1/28/2022 |
1004 | Mark Johnson | Intern 2 | 27.5 | 1/28/2022 |
1000 | Jane Doe | Staff 1 | 38.8 | 2/4/2022 |
1001 | John Doe | Staff 2 | 40 | 2/4/2022 |
1002 | Mike Smith | Intern | 40 | 2/4/2022 |
1003 | John Roberts | Staff 3 | 38.8 | 2/4/2022 |
1004 | Mark Johnson | Intern 2 | 27.5 | 2/4/2022 |
1000 | Jane Doe | Staff 1 | 38.8 | 2/11/2022 |
1001 | John Doe | Staff 2 | 40 | 2/11/2022 |
1002 | Mike Smith | Intern | 40 | 2/11/2022 |
1003 | John Roberts | Staff 3 | 38.8 | 2/11/2022 |
1004 | Mark Johnson | Intern 2 | 27.5 | 2/11/2022 |
1000 | Jane Doe | Staff 1 | 38.8 | 2/18/2022 |
1001 | John Doe | Staff 2 | 40 | 2/18/2022 |
1002 | Mike Smith | Intern | 40 | 2/18/2022 |
1003 | John Roberts | Staff 3 | 38.8 | 2/18/2022 |
1004 | Mark Johnson | Intern 2 | 27.5 | 2/18/2022 |
Solved! Go to Solution.
Hi,
to have it in Power query you can:
- duplicate your date table and filter it to have only WeekEnd (in your case you want Friday)
- then in your table you add a custom column referring the name of the query of your filtered date table
- expand custom column
- now expand custom table
- change type yo date
and that's done
If this post isuseful to help you to solve your issue consider giving the post a thumbs up and accepting it as a solution !
Hi,
to have it in Power query you can:
- duplicate your date table and filter it to have only WeekEnd (in your case you want Friday)
- then in your table you add a custom column referring the name of the query of your filtered date table
- expand custom column
- now expand custom table
- change type yo date
and that's done
If this post isuseful to help you to solve your issue consider giving the post a thumbs up and accepting it as a solution !
Thank you! This is exactly it and very straightforward! One of these days I'll be able to logically step through this in my head.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
114 | |
101 | |
78 | |
75 | |
49 |
User | Count |
---|---|
145 | |
108 | |
107 | |
89 | |
61 |