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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
Syndicate_Admin
Administrator
Administrator

How to calculate WTE for Duplicate Records

I have staff data that incudes staff with multiple contracts with various hours (WTE)  In Excel I use CountIF to identify them and Index the WTE.  I then create a new column in Excel using Count IF to add the WTEs together for the duplicate records. I have tried to replicate this on Power Query but cannot get it to work. Any help would be greatly appreciated.

Raw Data:

Ciaran_0-1648799532378.png

Data After Count Ifs are added on EXCEL

Ciaran_1-1648799613973.png

The First Count IF Identifies how many posts the person has (Head Count)

The 2nd Count IF I use in Excel adds the WTE together in the Updated WTE Column for those that are duplicate NI Nos and gives  a total for those duplicates.  It also gives the WTE for the non duplicates in the Update WTE column

I have attached a sample spreadsheet for ease.  If anyone could help me I would b greatly appreciative.

1 ACCEPTED SOLUTION
serpiva64
Solution Sage
Solution Sage

Hi,

to get 

serpiva64_0-1648803505852.png

 

you can try this:

- Group by

serpiva64_1-1648803531586.png

- add a index

serpiva64_2-1648803554890.png

- choose columns

serpiva64_3-1648803578493.png

- expand

serpiva64_4-1648803600105.png

- group by again

serpiva64_6-1648804939030.png

- choose columns

serpiva64_7-1648805038222.png

- expand

serpiva64_8-1648805069803.png

- add a conditional column

serpiva64_9-1648805127708.png

- finally delete unnecessary columns and reorder

 

If this post is useful to help you to solve your issue consider giving the post a thumbs up 

 and accepting it as a solution !

 

 

 

 

View solution in original post

2 REPLIES 2
serpiva64
Solution Sage
Solution Sage

Hi,

to get 

serpiva64_0-1648803505852.png

 

you can try this:

- Group by

serpiva64_1-1648803531586.png

- add a index

serpiva64_2-1648803554890.png

- choose columns

serpiva64_3-1648803578493.png

- expand

serpiva64_4-1648803600105.png

- group by again

serpiva64_6-1648804939030.png

- choose columns

serpiva64_7-1648805038222.png

- expand

serpiva64_8-1648805069803.png

- add a conditional column

serpiva64_9-1648805127708.png

- finally delete unnecessary columns and reorder

 

If this post is useful to help you to solve your issue consider giving the post a thumbs up 

 and accepting it as a solution !

 

 

 

 

Vijay_A_Verma
Super User
Super User

Attachment missing. Please re-attach. 

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors
Top Kudoed Authors