Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Changes Between Reports - Complexity Management

Hello Everyone,

 

Here is the challenge I am facing. I have one headcount report (*xlsx) every month. Exactly the same columns, thousands of rows. 

 

What is the goal?

1. Compare records between the reports and see which employees are missing.

 

I can do that by merging tables with ANTI joins. So, for instance, I will see which employees are missing in the August report, but are included in the September report. And another way around - who is included in September, but missing in August.

 

I would like to see the output in two new tables, for example, if comparing September to August, 20190831_Leavers, and 20190831_Hires. 

 

I want this to be as automated as possible... but I am not sure how to do so. Ideally - pasting the file with August, September, October, etc. report to the folder and all the rest happens automatically... is the Python script good solution for achieving this?

 

2. Append all the records from all tables to the "Global" table with a new column showing the name of the original table (for instance 20190831_Leavers, 20190831_Hires).

 

Therefore, I would be able to quickly filter this column and show how many employees left YTD or each month, all the fluxes, etc.

 

thank you for help!

3 REPLIES 3
Nathaniel_C
Community Champion
Community Champion

Hi @Anonymous ,

Will attach Pbix in  a couple.  The crux was selecting the second month, and creating new table from the merge, and using anti.  This is all in Power Query so should be fully auto.
Let me know if you have any questions.

If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos are nice too.
Nathaniel

New fires in sept.PNG

let
    Source = Table.NestedJoin(September, {"Emp"}, August, {"Emp"}, "August", JoinKind.RightAnti),
    #"Expanded August" = Table.ExpandTableColumn(Source, "August", {"Emp", "ID"}, {"August.Emp", "August.ID"}),
    #"Removed Columns" = Table.RemoveColumns(#"Expanded August",{"Emp", "ID"})
in
    #"Removed Columns"




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Hires and fires.PNG

Hi @Anonymous ,

Here is the PBIX Hires and Fires
Let me know if you have any questions.

If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos are nice too.
Nathaniel





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Anonymous
Not applicable

@Nathaniel_C  - thank you for your help!

 

I am just wondering now... once I get October data (*xlsx), is there a smart way (automation) that will automatically create four new tables with:

* October New Hires (vs August and vs Sep)

* October New Fires (vs August and vs Sep)

 

Or do I need to manually create queries and adjust the M code?

 

thank you once again!

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors