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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.