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
carlobonan
Helper II
Helper II

Counts values ​​with two variables referring to a date of a different db. It's possible ?

Hello everybody, Can you kindly help me calculate the number of employees on different dates, based on two conditions (hiring date and job completion date) by comparing these two values against the dates in a different table ?

 

 

total at 19/02/2021

 

total at the end of last year (31.12.2020)

 

total at the end of lastMONTH (29.01.2021)

 

total at 12/02/2021 (-7 day of lastdate)

employees in force at the date

429

 

381

 

413

 

418

 

 

 

 

 

 

 

 

employees in force at the date with at least two months of activity

378

 

336

 

352

 

366

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

conditions

 

 

 

 

 

 

 

DT_start

<= 19/2/21 aka last/maxdate other db

 

<= 31/12/20 aka  total at the end of the previous year at the  other db

 

<= 29/1/21 aka last MONTH at other db

 

<= 17/2/21 aka last/maxdate -7 DAY other db

DT_end

>=19/2/21 aka last/maxdate other db

 

>=31/12/20 aka   total at the end of the previous year at the  other db

 

>=29/1/21 aka last MONTH at other db

 

>=17/2/21 aka last/maxdate -7 DAY  other db

id

<> *

 

<> *

 

<> *

 

<> *

 

 

 

 

 

 

 

 

 

 

 

db 

 

2 REPLIES 2
carlobonan
Helper II
Helper II

no one can help me?

Hi, @carlobonan 

 

Why end date is bigger than start date in your excel table? Your requirements are easy to achieve, but I found that the results are a bit different from what you gave. Can you explain your logic more clearly? So we can help you soon.

 

Best Regards

Janey Guo

 

 

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.