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
Jaesonkim
Frequent Visitor

Counter in between two dates

Hello, i want to have your great solution and idea for the calculation

I want to counter the number of contract between the contract start date and expired date

i have 2 simple table as date lookup and contract table.

if i make filter with the date lookup and i choose certain year month, i want to show the contract number, which are in the between the two dates .

i did below dax measure but it's not working as what i want.

Count contracts in period =
CALCULATE( DISTINCTCOUNT('Table'[Contract No.]), FILTER(ALL('Lookup Date'),'Lookup Date'[Date] <= MAX('Lookup Date'[Date])))
here is the link
Jaesonkim_0-1678855803460.pngJaesonkim_1-1678855817803.png

 

Jaesonkim_0-1678862744473.png

 

 
2 ACCEPTED SOLUTIONS
tamerj1
Super User
Super User

Hi @Jaesonkim 
Please refer to attached sample file with the solution

1.png

View solution in original post

Jaesonkim
Frequent Visitor

Really thanks for your help. it's working perfectly 😁

View solution in original post

2 REPLIES 2
Jaesonkim
Frequent Visitor

Really thanks for your help. it's working perfectly 😁

tamerj1
Super User
Super User

Hi @Jaesonkim 
Please refer to attached sample file with the solution

1.png

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.

Top Solution Authors