0
votes

I have 2 tables:

Consents

ConsentID Consent Date Inspection Required
1 1 Aug 2021 Yes
2 10 Sept 2021 No

Consent Reviews

ConsentID Review Date
1 10 Aug 2021
1 15 Aug 2021
1 2 Sept 2021
2 5 Sept 2021

I would like to create a DAX measure that counts the Consents that have Inspection Required = Yes and (Consent Date is between the measures [Period Start] and [Period End] or the Consent has a Consent Review record in the same period). Note the use of brackets - I have some criteria that must be matched in the parent table, and other criteria where there is either a match in the parent table or a match in the child table.

Looking at my example if the period equated to August or September we would get 1 qualifying Consent. If it was October we would get zero.