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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 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.