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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
endelk
Regular Visitor

Countif with multiple filters based on two different tables

Hi,

 

My first time posting here so sorry for any mistakes.

 

I have two tables, one factual with employee movements and their countries on each date and another one with employees' assignments.

 

Table 1 - movements

DateEmployeeMovementCountry
01/01/2012AHireCanada
25/12/2015ATransferUS
01/01/2018ATerminationUS
25/01/2015BHireCanada
03/02/2018BTransferNorway
04/07/2016CTransferBelgium
01/01/2015DTransferNorway

 

Table 2 - assignments

EmployeeAssignment start dateAssignment end dateCoutry of assignment
A01/01/201301/12/2015US
B01/01/201601/01/2018Norway
C01/01/201601/07/2016US
D01/01/201601/01/2017Norway

 

I want to count how many employees were transferred to their countries of assignment after the assignment completed. So, in this case, both employees A and B should be counted:

  • employee A was transferred in 25/12/2015 from Canada to US and his country of assignment was US
  • employee B was transferred in 03/02/2018 from Canada to Norway and his country os assignment was Norway
  • employee C was transferred to Belgium after the end of assignment of in US, so should be disregarded.
  • employee D was transferred before the assignment started, so should be also disregarded.

 

I am kind of stuck here and tried several ways to filter both columns (end date and countries). Any hints?

 

Tks in advance!

 

 

1 ACCEPTED SOLUTION
gpiero
Skilled Sharer
Skilled Sharer

@endelk

Hello

is the next useful solution for your need?

Best regards

If I can...

View solution in original post

2 REPLIES 2
gpiero
Skilled Sharer
Skilled Sharer

@endelk

Hello

is the next useful solution for your need?

Best regards

If I can...

@endelk 
Hi,

if that helps you please mark as solution accepted

Regards

If I can...

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.