For each date return all names even when no record in data, PowerQuery

nahaku

Board Regular
Joined
Mar 19, 2020
Messages
106
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
I would like to make template where i import data and it will creates report, They want from me to show there days when person did not work with value as "Not-working-day"

But I do not have this in attendance output datas. Is it possible to generate rows in merged tables in this way:

for each day return all employees from list even if they had no data, then i would use simple if statement: if there is no value in worked time return "Not-working-day"
员工工号 staff no是否职能员工 is functional staff: Y fro yes , N for not日期 date :yyyy-mm-dd考勤时长 attendance hour:小时
1001Y
2021-03-01​
9
1001Y
2021-03-02​
9
1001Y
2021-03-03​
10
1001Y
2021-03-04​
7.5
1001Y
2021-03-05​
7
1001Y
2021-03-06​
Non-working day
1001Y
2021-03-07​
Non-working day
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
When you have a table with dates you can use Power Query to combine the tables with Combine-Querie's combine
 
Upvote 0
When you have a table with dates you can use Power Query to combine the tables with Combine-Querie's combine
can you show what you mean? because i think you mean Merge, what i done already, but it only adds Names to dates where is some record, otherwise it will be just Date without any records.
 
Upvote 0
How about showing us your source data from both tables and letting us try to solve and present what you have shown (I believe) is the end result. BTW. Please use XL2BB so that we don't have to try and retype your data to solve your issue.
 
Upvote 0
You can choose for join LeftOuter or FullOuter.
= Table.NestedJoin(#"Typ changed", {"Date"}, tbl_date, {"dateworking"}, "tbl_hours", JoinKind.LeftOuter)
 
Last edited:
Upvote 0
How about showing us your source data from both tables and letting us try to solve and present what you have shown (I believe) is the end result. BTW. Please use XL2BB so that we don't have to try and retype your data to solve your issue.
its quite simple, I have 2 tables: Date table contains only dates second table NameID contains: Name and ID
So I need to join this 2 tables without any common column so each date will have all IDs , then i can use merge this new table to add attendance records.
Template.xlsx
IJKLMNOP
4Date TableNameID TableCombined Table:
5DatenameIDDatenameID
62021-03-01Bob1112021-03-01Bob111
72021-03-02Sam2222021-03-01Sam222
82021-03-03Ivan3332021-03-01Ivan333
92021-03-04Peter4442021-03-01Peter444
102021-03-02Bob111
112021-03-02Sam222
122021-03-02Ivan333
132021-03-02Peter444
142021-03-03Bob111
152021-03-03Sam222
162021-03-03Ivan333
172021-03-03Peter444
182021-03-04Bob111
192021-03-04Sam222
202021-03-04Ivan333
212021-03-04Peter444
HelpSheet
 
Upvote 0

Forum statistics

Threads
1,223,723
Messages
6,174,121
Members
452,545
Latest member
boybenqn

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top