I'm new to Power BI and creating measures with DAX. I have two tables ('Visits' and 'Customers'). I want to get a distinct count for the [customer_id] in the Visits table where 'Visits'[closedFlag] = 1 and 'Customers'[formFLG] = 1. Basically, I'm trying to create a measure that counts the customer id based on two conditions from two different tables. There is an one to many relationship between Customers and Visits. This is the DAX measure I tried to create...
= CALCULATE(DISTINCTCOUNT('Visits'[CustomerID]),'Visits','Visits'[closedFLG] = 1 && 'Customers'[formFLG] = 1)
But I get the following error... "The expression contains columns from multiple tables, but only columns from a single table can be used in a True/False expression that is used as a table filter expression.
Thanks for any help with this I can receive.