Forum Discussion
zhris
2 years agoNew Member
Count based on dates in two tables
Hi! I have two tables: One has an order ID and a submission date The other has a Completion date. I'm trying to write a DAX measure to count orders where the submission date is on or before...
- Anonymous2 years ago
Hi, zhris
You can try the following methods.
Sample data:
orders pre = CALCULATE( DISTINCTCOUNT(Completion[Order ID]),FILTER(Completion,[Completion Date]>=MAX(Submission[Submission date])))Is this the result you expected?
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Gaga_Jin
2 years agoFrequent Visitor
CALCULATE(
COUNTROWS('Orders'),
FILTER(
'Orders',
'Orders'[SubmissionDate] <=
RELATED('Completions'[CompletionDate])
)
)