Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi!
I have two tables:
I'm trying to write a DAX measure to count orders where the submission date is on or before the completion date, but I'm running into an error in my syntax. Here's what I'm trying so far:
orders pre =
CALCULATE(
DISTINCTCOUNT(Table1[JOB_ID])
, Table2[Completion Date] >= Table1[JOB_CREATE_DATE]Is this possible? Thanks!
Solved! Go to Solution.
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.
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.
CALCULATE(
COUNTROWS('Orders'),
FILTER(
'Orders',
'Orders'[SubmissionDate] <=
RELATED('Completions'[CompletionDate])
)
)
You need to share details on the tables, the relationships between them and which columns are part of the relationship .
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 20 | |
| 11 | |
| 10 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 33 | |
| 30 | |
| 19 | |
| 11 | |
| 10 |